NHS and GOV.UK email branding pages now show preview and apply branding

The pages you were redirected to if you selected either GOV.UK branding
or NHS branding used to give information about the branding and have a
button that submitted a Zendesk ticket. Now, we show a preview of the
new branding and the button applies it.
This commit is contained in:
Katie Smith
2022-02-22 11:37:40 +00:00
parent 87e6737f9e
commit 5ada431da9
4 changed files with 82 additions and 92 deletions

View File

@@ -80,6 +80,8 @@ PLATFORM_ADMIN_SERVICE_PERMISSIONS = OrderedDict([
('international_letters', {'title': 'Send international letters', 'requires': 'letter'}),
])
NHS_BRANDING_ID = 'a7dc4e56-660b-4db7-8cff-12c37b12b5ea'
@main.route("/services/<uuid:service_id>/service-settings")
@user_has_permissions('manage_service', 'manage_api_keys')
@@ -1196,9 +1198,9 @@ def email_branding_govuk(service_id):
check_branding_allowed_for_service('govuk')
if request.method == 'POST':
create_email_branding_zendesk_ticket('govuk')
current_service.update(email_branding=None)
flash('Thanks for your branding request. Well get back to you within one working day.', 'default')
flash('Youve updated your email branding', 'default')
return redirect(url_for('.service_settings', service_id=current_service.id))
return render_template('views/service-settings/branding/email-branding-govuk.html')
@@ -1224,12 +1226,12 @@ def email_branding_nhs(service_id):
check_branding_allowed_for_service('nhs')
if request.method == 'POST':
create_email_branding_zendesk_ticket('nhs')
current_service.update(email_branding=NHS_BRANDING_ID)
flash('Thanks for your branding request. Well get back to you within one working day.', 'default')
flash('Youve updated your email branding', 'default')
return redirect(url_for('.service_settings', service_id=current_service.id))
return render_template('views/service-settings/branding/email-branding-nhs.html')
return render_template('views/service-settings/branding/email-branding-nhs.html', nhs_branding_id=NHS_BRANDING_ID)
@main.route("/services/<uuid:service_id>/service-settings/email-branding/organisation", methods=['GET', 'POST'])

View File

@@ -5,7 +5,7 @@
{% from "components/page-header.html" import page_header %}
{% block service_page_title %}
Before you request new branding
Check your new branding
{% endblock %}
{% block backLink %}
@@ -16,16 +16,17 @@
{% block maincolumn_content %}
{{ page_header('Before you request new branding') }}
{{ page_header('Check your new branding') }}
<p class="govuk-body">Check that your new branding matches the rest of your service.</p>
<p class="govuk-body">
Emails from {{ current_service.name }} will look like this.
</p>
<p class="govuk-body">You can use the GOV.UK logo on your emails if:</p>
<ul class="list list-bullet">
<li>your website looks like GOV.UK</li>
<li>your email links to a website that looks like GOV.UK</li>
<li>people get an email from your service after using GOV.UK</li>
</ul>
<iframe src="{{ url_for('main.email_template', branding_style='__NONE__') }}" class="branding-preview"></iframe>
<h2 class="heading-medium">Before you continue</h2>
<p class="govuk-body">You can only use GOV.UK branding if people go to GOV.UK to access your service.</p>
<p class="govuk-body">
You cannot use GOV.UK branding if your organisation is
@@ -34,10 +35,8 @@
from government</a>.
</p>
<p class="govuk-body">Well email you once your brandings ready to use, or if we need any more information.</p>
{% call form_wrapper() %}
{{ page_footer('Request new branding') }}
{{ page_footer('Use this branding') }}
{% endcall %}
{% endblock %}

View File

@@ -5,7 +5,7 @@
{% from "components/page-header.html" import page_header %}
{% block service_page_title %}
Before you request new branding
Check your new branding
{% endblock %}
{% block backLink %}
@@ -16,18 +16,24 @@
{% block maincolumn_content %}
{{ page_header('Before you request new branding') }}
{{ page_header('Check your new branding') }}
<p class="govuk-body">
<a class="govuk-link govuk-link--no-visited-state" href="https://www.england.nhs.uk/nhsidentity/identity-guidelines/who-can-use-the-nhs-identity/">Check that your service is allowed to use the NHS identity</a>.
Emails from {{ current_service.name }} will look like this.
</p>
<p class="govuk-body">Your new branding should match the rest of your service.</p>
<iframe src="{{ url_for('main.email_template', branding_style=nhs_branding_id) }}" class="branding-preview"></iframe>
<p class="govuk-body">Well email you once your brandings ready to use, or if we need any more information.</p>
<h2 class="heading-medium">Before you continue</h2>
<p class="govuk-body">Make sure youre allowed to use NHS branding.</p>
<p class="govuk-body">
If youre not sure, <a class="govuk-link govuk-link--no-visited-state" href="https://www.england.nhs.uk/nhsidentity/identity-guidelines/who-can-use-the-nhs-identity/">check the guidance on the NHS website</a>.
</p>
{% call form_wrapper() %}
{{ page_footer('Request new branding') }}
{{ page_footer('Use this branding') }}
{% endcall %}
{% endblock %}