mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 01:55:41 -04:00
Previously we duplicated the "something else" email branding form on its own page and embedded in the choices form (if it was the only option). See [^1] for how this looks - it's inconsistent. This DRYs-up the "something else" form by bypassing the choices form when "something else" is the only option. I've also tweaked the "Back" button to be consistent with this behaviour. Making this change also simplifies the choices form, which we'll be adding pool options to shortly. I'd like to make the letters form consistent, but let's see how emails pan out first. Note that the choices form will now show a single radio button if "something else" is the only option. I think that's OK as nothing will link to the page, and the form still works. [^1]: https://github.com/alphagov/notifications-admin/pull/4163#issuecomment-1050088088
47 lines
1.4 KiB
HTML
47 lines
1.4 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/radios.html" import radio %}
|
|
{% from "components/select-input.html" import select_wrapper %}
|
|
{% from "components/textbox.html" import textbox %}
|
|
{% from "components/page-header.html" import page_header %}
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
{% from "components/form.html" import form_wrapper %}
|
|
{% from "components/back-link/macro.njk" import govukBackLink %}
|
|
|
|
{% block service_page_title %}
|
|
Change email branding
|
|
{% endblock %}
|
|
|
|
{% block backLink %}
|
|
{{ govukBackLink({
|
|
"href": url_for('.service_settings', service_id=current_service.id)
|
|
}) }}
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
{{ page_header('Change email branding') }}
|
|
|
|
<p class="govuk-body">
|
|
Your emails currently have {{ branding_name }} branding.
|
|
</p>
|
|
|
|
{% set branding_id = current_service.email_branding_id if current_service.email_branding else '__NONE__' %}
|
|
<iframe src="{{ url_for('main.email_template', branding_style=branding_id) }}" class="branding-preview"></iframe>
|
|
|
|
{% if current_service.needs_to_change_email_branding %}
|
|
<p class="govuk-body">
|
|
You should be using your own branding instead.
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% call form_wrapper() %}
|
|
{% call select_wrapper(form.options) %}
|
|
{% for option in form.options %}
|
|
{{ radio(option) }}
|
|
{% endfor %}
|
|
{% endcall %}
|
|
{{ page_footer('Continue') }}
|
|
{% endcall %}
|
|
|
|
{% endblock %}
|