Skip to content

Commit

Permalink
Update design system to version 25.1.1 (#342)
Browse files Browse the repository at this point in the history
* Update design system version to 25.1.1

* remove feedback from all footer and fix submit button bug

* updated translation templates

* update csp nonce

* remove blank lines

* Update design system version to 25.1.1

* passed in cspnonce value

* change test button text as no hardcoded

* pr comments

* remove old feeback file

* Update templates/layouts/_base.html

Co-authored-by: Mebin Abraham <[email protected]>

Co-authored-by: rmccar <[email protected]>
Co-authored-by: Richard McCarthy <[email protected]>
Co-authored-by: Mebin Abraham <[email protected]>
  • Loading branch information
4 people authored Oct 15, 2020
1 parent 36275c0 commit 3210cb8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .design-system-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25.0.3
25.1.1
1 change: 1 addition & 0 deletions app/helpers/template_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
30 changes: 3 additions & 27 deletions app/translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-10-13 16:17+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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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 ""

Expand Down Expand Up @@ -836,7 +836,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 ""

Expand All @@ -848,30 +848,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 ""
Expand Down
4 changes: 2 additions & 2 deletions templates/confirmation.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
}
})
}}
{% else %}
{% else %}
{% if block and block.content %}
{% set content_block = block.content %}
{% include 'partials/content-block.html' %}
{% endif %}
<p class="u-mt-m">
{{
onsButton({
"text": content.submit_button,
"text": _("Submit answers"),
"submitType": 'timer',
"classes": "btn--loader js-btn-submit",
"attributes": {
Expand Down
13 changes: 5 additions & 8 deletions templates/layouts/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"cdn": {
"url": cdn_url
},
"cspNonce": csp_nonce,
} %}

{% 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 %}
Expand Down Expand Up @@ -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
-->
<script nonce="{{ csp_nonce() }}">
<script nonce="{{ csp_nonce }}">
dataLayer = {{ data_layer | tojson }}
</script>

<!-- Google Tag Manager -->
<script nonce="{{ csp_nonce() }}">
<script nonce="{{ csp_nonce }}">
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
Expand All @@ -78,16 +78,13 @@
</noscript>
<!-- End Google Tag Manager (noscript) -->
{% endif %}



{% endblock %}


{% block scripts %}
{% if config['EQ_ENABLE_LIVE_RELOAD'] %}
<script nonce="{{ csp_nonce() }}" id="__bs_script__">//<![CDATA[
document.write("<script async nonce='{{ csp_nonce() }}' src='http://HOST:35729/livereload.js'><\/script>".replace("HOST", location.hostname));
<script nonce="{{ csp_nonce }}" id="__bs_script__">//<![CDATA[
document.write("<script async nonce='{{ csp_nonce }}' src='http://HOST:35729/livereload.js'><\/script>".replace("HOST", location.hostname));
//]]></script>
{% endif %}
{% endblock %}
21 changes: 0 additions & 21 deletions templates/layouts/configs/_feedback.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
});

0 comments on commit 3210cb8

Please sign in to comment.