Merge pull request #4180 from alphagov/dedup-something-else-181415991

Link directly to email branding "something else"
This commit is contained in:
Ben Thorner
2022-03-07 11:33:11 +00:00
committed by GitHub
6 changed files with 116 additions and 166 deletions

View File

@@ -92,12 +92,18 @@
}}
{% endcall %}
{% if email_branding_options.something_else_is_only_option %}
{% set email_request_url = url_for('.email_branding_something_else', service_id=current_service.id) %}
{% else %}
{% set email_request_url = url_for('.email_branding_request', service_id=current_service.id) %}
{% endif %}
{% call settings_row(if_has_permission='email') %}
{{ text_field('Email branding') }}
{{ text_field(current_service.email_branding_name) }}
{{ edit_field(
'Change',
url_for('.email_branding_request', service_id=current_service.id),
email_request_url,
permissions=['manage_service'],
suffix='email branding',
)}}

View File

@@ -34,27 +34,13 @@
</p>
{% endif %}
{% if form.something_else_is_only_option %}
{% call form_wrapper() %}
{{ textbox(
form.something_else,
hint='Include links to your brand guidelines or examples of how to use your branding.',
width='1-1',
) }}
<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 %}
{% else %}
{% call form_wrapper() %}
{% call select_wrapper(form.options) %}
{% for option in form.options %}
{{ radio(option) }}
{% endfor %}
{% endcall %}
{{ page_footer('Continue') }}
{% endcall %}
{% endif %}
{% call form_wrapper() %}
{% call select_wrapper(form.options) %}
{% for option in form.options %}
{{ radio(option) }}
{% endfor %}
{% endcall %}
{{ page_footer('Continue') }}
{% endcall %}
{% endblock %}

View File

@@ -9,10 +9,14 @@
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": url_for('.email_branding_request', service_id=current_service.id)
}) }}
{{ govukBackLink({"href": back_url}) }}
{% endblock %}
{% block maincolumn_content %}