Files
notifications-admin/app/templates/views/service-settings/branding/email-branding-something-else.html
Ben Thorner 33c6ca0989 Link directly to email branding "something else"
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
2022-03-03 10:18:58 +00:00

31 lines
1.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% 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">Well email you when your branding is ready, or if we need any more information.</p>
{{ page_footer('Request new branding') }}
{% endcall %}
{% endblock %}