Split out the govuk and govuk_and_org branding templates

The `.email_branding_govuk` and `.email_branding_govuk_and_org` routes
shared a template since the content was the same - the only difference
was in the action of the button. However, since the pages will no longer
be so similar (e.g. the govuk page will show a preview) this splits them
up to use separate templates.

It may be the case that when the branding work is complete these pages
are fairly similar and we decided that one template between the two
endpoints is the best option again.
This commit is contained in:
Katie Smith
2022-02-17 14:52:24 +00:00
parent 9f45e4c5be
commit d75c1ea398
4 changed files with 107 additions and 12 deletions

View File

@@ -1196,7 +1196,7 @@ def email_branding_govuk(service_id):
check_branding_allowed_for_service('govuk')
if request.method == 'POST':
create_email_branding_zendesk_ticket(request.form['branding_choice'])
create_email_branding_zendesk_ticket('govuk')
flash('Thanks for your branding request. Well get back to you within one working day.', 'default')
return redirect(url_for('.service_settings', service_id=current_service.id))
@@ -1210,12 +1210,12 @@ def email_branding_govuk_and_org(service_id):
check_branding_allowed_for_service('govuk_and_org')
if request.method == 'POST':
create_email_branding_zendesk_ticket(request.form['branding_choice'])
create_email_branding_zendesk_ticket('govuk_and_org')
flash('Thanks for your branding request. Well get back to you within one working day.', 'default')
return redirect(url_for('.service_settings', service_id=current_service.id))
return render_template('views/service-settings/branding/email-branding-govuk.html', with_org=True)
return render_template('views/service-settings/branding/email-branding-govuk-org.html')
@main.route("/services/<uuid:service_id>/service-settings/email-branding/nhs", methods=['GET', 'POST'])