mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 16:28:25 -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
31 lines
1.0 KiB
HTML
31 lines
1.0 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/form.html" import form_wrapper %}
|
||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
{% from "components/textbox.html" import textbox %}
|
||
{% from "components/textarea/macro.njk" import govukTextarea %}
|
||
|
||
{% block service_page_title %}
|
||
Describe the branding you want
|
||
{% endblock %}
|
||
|
||
{% if branding_options.something_else_is_only_option %}
|
||
{% set back_url = url_for('.service_settings', service_id=current_service.id) %}
|
||
{% else %}
|
||
{% set back_url = url_for('.email_branding_request', service_id=current_service.id) %}
|
||
{% endif %}
|
||
|
||
{% block backLink %}
|
||
{{ govukBackLink({"href": back_url}) }}
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
{% call form_wrapper(class="govuk-!-margin-top-3") %}
|
||
{{ form.something_else }}
|
||
<p class="form-group">We’ll email you when your branding is ready, or if we need any more information.</p>
|
||
{{ page_footer('Request new branding') }}
|
||
{% endcall %}
|
||
|
||
{% endblock %}
|