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'])