From e6f40ad73c20ddb02dc6a1f87af5ceeee97afeca Mon Sep 17 00:00:00 2001 From: ons-eq-team <64150678+ons-eq-team@users.noreply.github.com> Date: Mon, 12 Oct 2020 11:34:28 +0000 Subject: [PATCH 01/11] Update design system version to 25.1.1 --- .design-system-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.design-system-version b/.design-system-version index b4e48e1410..139ab877a8 100644 --- a/.design-system-version +++ b/.design-system-version @@ -1 +1 @@ -25.0.3 +25.1.1 From 6e27b8719a68f14e442c03f48cca0362e53e5a89 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Tue, 13 Oct 2020 13:43:29 +0100 Subject: [PATCH 02/11] remove feedback from all footer and fix submit button bug --- templates/confirmation.html | 4 ++-- templates/layouts/_base.html | 1 - templates/layouts/configs/_feedback.html | 22 ++++------------------ 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/templates/confirmation.html b/templates/confirmation.html index ec27d4f855..cbd62312e9 100644 --- a/templates/confirmation.html +++ b/templates/confirmation.html @@ -16,7 +16,7 @@ } }) }} - {% else %} + {% else %} {% if block and block.content %} {% set content_block = block.content %} {% include 'partials/content-block.html' %} @@ -24,7 +24,7 @@

{{ onsButton({ - "text": content.submit_button, + "text": _("Submit answers"), "submitType": 'timer', "classes": "btn--loader js-btn-submit", "attributes": { diff --git a/templates/layouts/_base.html b/templates/layouts/_base.html index 4cf67bac5b..1697dcc46d 100644 --- a/templates/layouts/_base.html +++ b/templates/layouts/_base.html @@ -22,7 +22,6 @@ {% include 'layouts/configs/_save-sign-out-button.html' %} {% include 'layouts/configs/_footer.html' %} -{% include 'layouts/configs/_feedback.html' %} {# if there is not a previous link add extra margin top to the page #} {% if not previous_location_url %} diff --git a/templates/layouts/configs/_feedback.html b/templates/layouts/configs/_feedback.html index 00cf933ffb..bc37e7df87 100644 --- a/templates/layouts/configs/_feedback.html +++ b/templates/layouts/configs/_feedback.html @@ -1,21 +1,7 @@ {% do pageConfig | setAttribute("feedback", { "id": "feedback", - "title": _("Give us feedback and help us improve this service"), - "pageTitle": { - "value": pageConfig.title - }, - "pageURL": { - "value": pageConfig.url - }, - "mailto": { - "address": "census2021.feedback@ons.gov.uk", - "textBefore": _("Tell us what you think of this service by emailing"), - "textAfter": _("If you need help with your census, get in touch with our contact centre."), - "subject": _("Census 2021 feedback: ") | urlencode, - "body": ("\n\n\n---\n" ~ _("This email is for feedback on the census rehearsal, which will help us to improve Census 2021.\nIf you need help with your census, visit https://www.census.gov.uk/contact-us.")) | urlencode - }, - "button":{ - "close": {}, - "send": {} - } + "header": "What do you think about this service?", + "content": "Your comments will help us make improvements", + "url": "#0", + "linkText": "Give Feedback" }) %} From e2319bdc488d5fa0e1f65c8dd30455633b320e6e Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Tue, 13 Oct 2020 13:51:08 +0100 Subject: [PATCH 03/11] updated translation templates --- app/translations/messages.pot | 98 +++++++++++++---------------------- 1 file changed, 37 insertions(+), 61 deletions(-) diff --git a/app/translations/messages.pot b/app/translations/messages.pot index c997d2c827..893beca607 100644 --- a/app/translations/messages.pot +++ b/app/translations/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-10-05 11:40+0100\n" +"POT-Creation-Date: 2020-10-13 13:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -237,11 +237,11 @@ msgid_plural "{number_of_days} days" msgstr[0] "" msgstr[1] "" -#: app/routes/individual_response.py:162 +#: app/routes/individual_response.py:160 msgid "An individual access code has been sent by post" msgstr "" -#: app/routes/individual_response.py:255 +#: app/routes/individual_response.py:252 msgid "An individual access code has been sent by text" msgstr "" @@ -318,7 +318,7 @@ msgid "Check your answers and submit" msgstr "" #: app/views/contexts/questionnaire_summary_context.py:18 -#: templates/confirmation.html:6 +#: templates/confirmation.html:6 templates/confirmation.html:27 msgid "Submit answers" msgstr "" @@ -335,136 +335,136 @@ msgstr "" msgid "Error: {page_title}" msgstr "" -#: app/views/handlers/individual_response.py:102 +#: app/views/handlers/individual_response.py:127 msgid "Person {list_item_position}" msgstr "" -#: app/views/handlers/individual_response.py:206 +#: app/views/handlers/individual_response.py:231 msgid "Cannot answer questions for others in your household" msgstr "" -#: app/views/handlers/individual_response.py:270 +#: app/views/handlers/individual_response.py:297 msgid "How would you like {person_name} to receive a separate census?" msgstr "" -#: app/views/handlers/individual_response.py:276 +#: app/views/handlers/individual_response.py:305 msgid "" "For someone to complete a separate census, we need to send them an " "individual access code." msgstr "" -#: app/views/handlers/individual_response.py:279 +#: app/views/handlers/individual_response.py:308 msgid "Select how to send access code" msgstr "" -#: app/views/handlers/individual_response.py:289 +#: app/views/handlers/individual_response.py:318 msgid "Text message" msgstr "" -#: app/views/handlers/individual_response.py:291 +#: app/views/handlers/individual_response.py:320 msgid "We will need their mobile number for this" msgstr "" -#: app/views/handlers/individual_response.py:296 +#: app/views/handlers/individual_response.py:325 msgid "Post" msgstr "" -#: app/views/handlers/individual_response.py:298 +#: app/views/handlers/individual_response.py:327 msgid "" "We can only send this to an unnamed resident at the registered household " "address" msgstr "" -#: app/views/handlers/individual_response.py:367 +#: app/views/handlers/individual_response.py:377 msgid "Send individual access code" msgstr "" -#: app/views/handlers/individual_response.py:396 +#: app/views/handlers/individual_response.py:408 msgid "How would you like to answer {person_name_possessive} questions?" msgstr "" -#: app/views/handlers/individual_response.py:409 +#: app/views/handlers/individual_response.py:423 msgid "I would like to request a separate census for them to complete" msgstr "" -#: app/views/handlers/individual_response.py:415 +#: app/views/handlers/individual_response.py:429 msgid "I will ask them to answer their own questions" msgstr "" -#: app/views/handlers/individual_response.py:419 +#: app/views/handlers/individual_response.py:433 msgid "They will need the household access code from the letter we sent you" msgstr "" -#: app/views/handlers/individual_response.py:425 +#: app/views/handlers/individual_response.py:439 msgid "I will answer for {person_name}" msgstr "" -#: app/views/handlers/individual_response.py:539 +#: app/views/handlers/individual_response.py:540 msgid "Do you want to send an individual access code for {person_name} by post?" msgstr "" -#: app/views/handlers/individual_response.py:545 +#: app/views/handlers/individual_response.py:548 msgid "" "A letter with an individual access code will be sent to your registered " "household address" msgstr "" -#: app/views/handlers/individual_response.py:552 +#: app/views/handlers/individual_response.py:555 msgid "" "The letter will be addressed to Individual Resident " "instead of the name provided" msgstr "" -#: app/views/handlers/individual_response.py:565 +#: app/views/handlers/individual_response.py:568 msgid "Yes, send the access code by post" msgstr "" -#: app/views/handlers/individual_response.py:569 +#: app/views/handlers/individual_response.py:574 msgid "No, send it another way" msgstr "" -#: app/views/handlers/individual_response.py:621 +#: app/views/handlers/individual_response.py:607 msgid "Confirm address" msgstr "" -#: app/views/handlers/individual_response.py:684 -#: app/views/handlers/individual_response.py:717 +#: app/views/handlers/individual_response.py:662 +#: app/views/handlers/individual_response.py:700 msgid "Separate Census" msgstr "" -#: app/views/handlers/individual_response.py:688 +#: app/views/handlers/individual_response.py:666 msgid "Who do you need to request a separate census for?" msgstr "" -#: app/views/handlers/individual_response.py:739 +#: app/views/handlers/individual_response.py:724 msgid "What is {person_name_possessive} mobile number?" msgstr "" -#: app/views/handlers/individual_response.py:749 +#: app/views/handlers/individual_response.py:736 msgid "UK mobile number" msgstr "" -#: app/views/handlers/individual_response.py:750 +#: app/views/handlers/individual_response.py:737 msgid "This will not be stored and only used once to send the access code" msgstr "" -#: app/views/handlers/individual_response.py:802 +#: app/views/handlers/individual_response.py:770 msgid "Mobile number" msgstr "" -#: app/views/handlers/individual_response.py:848 +#: app/views/handlers/individual_response.py:816 msgid "Is this mobile number correct?" msgstr "" -#: app/views/handlers/individual_response.py:857 +#: app/views/handlers/individual_response.py:825 msgid "Yes, send the text" msgstr "" -#: app/views/handlers/individual_response.py:861 +#: app/views/handlers/individual_response.py:829 msgid "No, I need to change it" msgstr "" -#: app/views/handlers/individual_response.py:895 +#: app/views/handlers/individual_response.py:863 msgid "Confirm mobile number" msgstr "" @@ -840,7 +840,7 @@ msgstr "" msgid "Request separate census" msgstr "" -#: templates/layouts/_base.html:40 +#: templates/layouts/_base.html:39 msgid "We use cookies to improve your experience of census.gov.uk" msgstr "" @@ -852,30 +852,6 @@ msgstr "" msgid "Choose another section and return to this later" msgstr "" -#: templates/layouts/configs/_feedback.html:3 -msgid "Give us feedback and help us improve this service" -msgstr "" - -#: templates/layouts/configs/_feedback.html:12 -msgid "Tell us what you think of this service by emailing" -msgstr "" - -#: templates/layouts/configs/_feedback.html:13 -msgid "If you need help with your census, get in touch with our contact centre." -msgstr "" - -#: templates/layouts/configs/_feedback.html:14 -msgid "Census 2021 feedback: " -msgstr "" - -#: templates/layouts/configs/_feedback.html:15 -msgid "" -"This email is for feedback on the census rehearsal, which will help us to" -" improve Census 2021.\n" -"If you need help with your census, visit https://www.census.gov.uk" -"/contact-us." -msgstr "" - #: templates/layouts/configs/_footer.html:31 msgid "Contact us" msgstr "" From 716196fbc611818c986365c1f6ee298428d2c496 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Tue, 13 Oct 2020 15:00:52 +0100 Subject: [PATCH 04/11] update csp nonce --- templates/layouts/_base.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/layouts/_base.html b/templates/layouts/_base.html index 1697dcc46d..4db6053f4b 100644 --- a/templates/layouts/_base.html +++ b/templates/layouts/_base.html @@ -50,12 +50,12 @@ Information such as events or variables can be passed to Google Tag Manager via the data layer, and triggers can be set up in Google Tag Manager --> - - {% endif %} {% endblock %} From 5caa2694287032fe3c5949613f506a657eb683cb Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Tue, 13 Oct 2020 15:35:14 +0100 Subject: [PATCH 05/11] remove blank lines --- templates/layouts/_base.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/layouts/_base.html b/templates/layouts/_base.html index 4db6053f4b..3315d0bf37 100644 --- a/templates/layouts/_base.html +++ b/templates/layouts/_base.html @@ -77,9 +77,6 @@ {% endif %} - - - {% endblock %} From f9417d811a02657c7b88824693711312a9a9897b Mon Sep 17 00:00:00 2001 From: ons-eq-team <64150678+ons-eq-team@users.noreply.github.com> Date: Wed, 14 Oct 2020 04:12:22 +0000 Subject: [PATCH 06/11] Update design system version to 25.1.1 --- .design-system-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.design-system-version b/.design-system-version index b4e48e1410..139ab877a8 100644 --- a/.design-system-version +++ b/.design-system-version @@ -1 +1 @@ -25.0.3 +25.1.1 From e7388195a2ba1654bb37b0b67e61b3d7b7058e0d Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Wed, 14 Oct 2020 09:11:48 +0100 Subject: [PATCH 07/11] passed in cspnonce value --- app/helpers/template_helpers.py | 1 + templates/layouts/_base.html | 1 + 2 files changed, 2 insertions(+) diff --git a/app/helpers/template_helpers.py b/app/helpers/template_helpers.py index 0bdc8d5613..1f2c345dc1 100644 --- a/app/helpers/template_helpers.py +++ b/app/helpers/template_helpers.py @@ -82,6 +82,7 @@ def render_template(template, **kwargs): language_code=get_locale().language, survey_title=survey_title, cdn_url=cdn_url, + csp_nonce=request.csp_nonce, address_lookup_api_url=current_app.config["ADDRESS_LOOKUP_API_URL"], data_layer=get_data_layer(theme), include_csrf_token=include_csrf_token, diff --git a/templates/layouts/_base.html b/templates/layouts/_base.html index 3315d0bf37..6747d921cf 100644 --- a/templates/layouts/_base.html +++ b/templates/layouts/_base.html @@ -18,6 +18,7 @@ "cdn": { "url": cdn_url }, + "cspNonce": csp_nonce, } %} {% include 'layouts/configs/_save-sign-out-button.html' %} From f3bfa71f6f13b98b31fb91b5acb3b96675c4df68 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Wed, 14 Oct 2020 10:25:50 +0100 Subject: [PATCH 08/11] change test button text as no hardcoded --- tests/functional/spec/features/summary/summary_screen.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/spec/features/summary/summary_screen.spec.js b/tests/functional/spec/features/summary/summary_screen.spec.js index 9feaa67085..82454d11e7 100644 --- a/tests/functional/spec/features/summary/summary_screen.spec.js +++ b/tests/functional/spec/features/summary/summary_screen.spec.js @@ -103,6 +103,6 @@ describe("Summary Screen", () => { expect($(SummaryPage.questionText()).getText()).to.contain("Submission title"); expect($(SummaryPage.warning()).getText()).to.contain("Submission warning"); expect($(SummaryPage.guidance()).getText()).to.contain("Submission guidance"); - expect($(SummaryPage.submit()).getText()).to.contain("Submission button"); + expect($(SummaryPage.submit()).getText()).to.contain("Submit answers"); }); }); From aaa0ed556b7adc4cd8da40ae192e01e3b53f6648 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Wed, 14 Oct 2020 12:23:45 +0100 Subject: [PATCH 09/11] pr comments --- templates/layouts/_base.html | 8 ++++---- templates/layouts/configs/_feedback.html | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/layouts/_base.html b/templates/layouts/_base.html index 6747d921cf..c7b94dc1d3 100644 --- a/templates/layouts/_base.html +++ b/templates/layouts/_base.html @@ -51,12 +51,12 @@ Information such as events or variables can be passed to Google Tag Manager via the data layer, and triggers can be set up in Google Tag Manager --> - - {% endif %} {% endblock %} diff --git a/templates/layouts/configs/_feedback.html b/templates/layouts/configs/_feedback.html index bc37e7df87..656c7ad5a0 100644 --- a/templates/layouts/configs/_feedback.html +++ b/templates/layouts/configs/_feedback.html @@ -1,7 +1,7 @@ {% do pageConfig | setAttribute("feedback", { "id": "feedback", - "header": "What do you think about this service?", - "content": "Your comments will help us make improvements", + "header": _("What do you think about this service?"), + "content": _("Your comments will help us make improvements"), "url": "#0", - "linkText": "Give Feedback" + "linkText": _("Give Feedback") }) %} From 5f632c7ee166e611403eac1407755e5d3c55efd6 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Wed, 14 Oct 2020 12:28:55 +0100 Subject: [PATCH 10/11] remove old feeback file --- templates/layouts/configs/_feedback.html | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 templates/layouts/configs/_feedback.html diff --git a/templates/layouts/configs/_feedback.html b/templates/layouts/configs/_feedback.html deleted file mode 100644 index 656c7ad5a0..0000000000 --- a/templates/layouts/configs/_feedback.html +++ /dev/null @@ -1,7 +0,0 @@ -{% do pageConfig | setAttribute("feedback", { - "id": "feedback", - "header": _("What do you think about this service?"), - "content": _("Your comments will help us make improvements"), - "url": "#0", - "linkText": _("Give Feedback") -}) %} From 16b8c1d5478be047b4f882771c64d1e6b37e3183 Mon Sep 17 00:00:00 2001 From: rmccar <42928680+rmccar@users.noreply.github.com> Date: Thu, 15 Oct 2020 11:33:16 +0100 Subject: [PATCH 11/11] Update templates/layouts/_base.html Co-authored-by: Mebin Abraham <35296336+MebinAbraham@users.noreply.github.com> --- templates/layouts/_base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layouts/_base.html b/templates/layouts/_base.html index c7b94dc1d3..74b1cf60e6 100644 --- a/templates/layouts/_base.html +++ b/templates/layouts/_base.html @@ -84,7 +84,7 @@ {% block scripts %} {% if config['EQ_ENABLE_LIVE_RELOAD'] %} {% endif %} {% endblock %}