From ef35d725e16527591395c74e5abfbb637b11b62e Mon Sep 17 00:00:00 2001 From: Mark Pittaway Date: Tue, 19 Mar 2024 13:52:47 +1100 Subject: [PATCH] [TGA-85] Remove article name field from AuthorApproval form --- .../extensions/tga-sign-off/src/interfaces.ts | 1 - server/templates/email_sign_off_copy.html | 4 ---- server/templates/email_sign_off_copy.txt | 3 --- server/templates/sign_off_approval_modal.html | 2 +- .../sign_off_approval_modal_form.html | 18 +----------------- server/tga/sign_off/form.py | 1 - server/tga/sign_off/sign_off_requests.py | 1 - server/tga/sign_off/utils.py | 2 -- server/tga/types.py | 1 - 9 files changed, 2 insertions(+), 31 deletions(-) diff --git a/client/extensions/tga-sign-off/src/interfaces.ts b/client/extensions/tga-sign-off/src/interfaces.ts index 9ab2b13..69304ad 100644 --- a/client/extensions/tga-sign-off/src/interfaces.ts +++ b/client/extensions/tga-sign-off/src/interfaces.ts @@ -5,7 +5,6 @@ export interface IAuthorSignOffData { sign_date: string; version_signed: number; - article_name: string; funding_source: string; affiliation: string; copyright_terms: string; diff --git a/server/templates/email_sign_off_copy.html b/server/templates/email_sign_off_copy.html index 4730dbf..0ce77ce 100644 --- a/server/templates/email_sign_off_copy.html +++ b/server/templates/email_sign_off_copy.html @@ -14,10 +14,6 @@ Thank you for authoring an article for 360info. We require you to agree to the following terms and provide the information requested before we can publish your article.

-

- Please add the name of the article
- {{ form.article_name.data }} -

About the article

diff --git a/server/templates/email_sign_off_copy.txt b/server/templates/email_sign_off_copy.txt index 768bd69..c057fd4 100644 --- a/server/templates/email_sign_off_copy.txt +++ b/server/templates/email_sign_off_copy.txt @@ -12,9 +12,6 @@ See below a copy of the answers you provided: Thank you for authoring an article for 360info. We require you to agree to the following terms and provide the information requested before we can publish your article. -*Please add the name of the article:* -{{ form.article_name.data }} - About the article Please provide the following information regarding the above-mentioned article. The information you provide may be published with the article. diff --git a/server/templates/sign_off_approval_modal.html b/server/templates/sign_off_approval_modal.html index cd6e6de..d57eed8 100644 --- a/server/templates/sign_off_approval_modal.html +++ b/server/templates/sign_off_approval_modal.html @@ -48,7 +48,7 @@

An error occurred while processing your request.

function showModal() { modalContainer.style.display = 'block'; setTimeout(() => { - document.getElementById('article_name').focus(); + document.getElementById('funding_source').focus(); }); } function hideModal() { diff --git a/server/templates/sign_off_approval_modal_form.html b/server/templates/sign_off_approval_modal_form.html index c1122a6..9e41405 100644 --- a/server/templates/sign_off_approval_modal_form.html +++ b/server/templates/sign_off_approval_modal_form.html @@ -18,22 +18,6 @@

Approval Details

terms and provide the information requested before we can publish your article.

-
-
- -
- {{ form.article_name( - class="sd-input__input", - id="article_name", - required="true", - readonly=readonly - ) }} -
-
-
-

About the article

Please provide the following information regarding the above-mentioned article. @@ -289,7 +273,7 @@

Author Consent

{{ form.consent_signature( diff --git a/server/tga/sign_off/form.py b/server/tga/sign_off/form.py index 05a33a4..ebaa038 100644 --- a/server/tga/sign_off/form.py +++ b/server/tga/sign_off/form.py @@ -9,7 +9,6 @@ class UserSignOffForm(FlaskForm): version_signed = HiddenField("Item Version Signed") sign_date = HiddenField("Signed Date") - article_name = StringField("Article Name", validators=[DataRequired()]) funding_source = StringField("Funding Source", validators=[DataRequired()]) affiliation = StringField("Affiliation", validators=[DataRequired()]) copyright_terms = StringField("Copyright Terms", validators=[DataRequired()]) diff --git a/server/tga/sign_off/sign_off_requests.py b/server/tga/sign_off/sign_off_requests.py index 1d24717..f09ad3d 100644 --- a/server/tga/sign_off/sign_off_requests.py +++ b/server/tga/sign_off/sign_off_requests.py @@ -130,7 +130,6 @@ def view_sign_off_request(item_id, user_id_str): user_id=user_id_str, version_signed=author_sign_off["version_signed"], sign_date=author_sign_off["sign_date"], - article_name=author_sign_off["article_name"], funding_source=author_sign_off["funding_source"], affiliation=author_sign_off["affiliation"], copyright_terms=author_sign_off["copyright_terms"], diff --git a/server/tga/sign_off/utils.py b/server/tga/sign_off/utils.py index 3778f97..0f97ae2 100644 --- a/server/tga/sign_off/utils.py +++ b/server/tga/sign_off/utils.py @@ -62,7 +62,6 @@ def get_publish_sign_off_data(item: Dict[str, Any]) -> Optional[PublishSignOffDa user_id=user_id, sign_date=legacy_sign_off["sign_date"], version_signed=item.get("version"), - article_name="", funding_source=legacy_sign_off.get("funding_source"), affiliation=legacy_sign_off.get("affiliation"), copyright_terms="", @@ -186,7 +185,6 @@ def update_item_publish_approval(item: Dict[str, Any], form: UserSignOffForm): user_id=user_id, sign_date=utcnow(), version_signed=form.version_signed.data, - article_name=form.article_name.data, funding_source=form.funding_source.data, affiliation=form.affiliation.data, copyright_terms=form.copyright_terms.data, diff --git a/server/tga/types.py b/server/tga/types.py index 889ce54..69dd59f 100644 --- a/server/tga/types.py +++ b/server/tga/types.py @@ -32,7 +32,6 @@ class AuthorSignOffData(TypedDict): sign_date: datetime version_signed: int - article_name: str funding_source: str affiliation: str copyright_terms: str