mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 16:48:26 -04:00
https://www.pivotaltracker.com/story/show/180026726 There was a bug where if you enter an invalid email address in to the edit reply to email address form and click save, the form you get shown with your error message will always contain the field to set as default the reply to and also delete. This should not have been the case. If you make an error on the form when changing a reply to that is already a default, then you should not be given the chance to change it to not default, nor should you be able to delete it. This commit fixes that bug by making sure the additional form fields are only shown if the reply to being changed is not the default.
42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/banner.html" import banner_wrapper %}
|
|
{% 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 reply-to email address
|
|
{% endblock %}
|
|
|
|
{% block backLink %}
|
|
{{ govukBackLink({ "href": url_for('main.service_email_reply_to', service_id=current_service.id) }) }}
|
|
{% endblock %}
|
|
{% block maincolumn_content %}
|
|
|
|
{{ page_header('Change reply-to email address') }}
|
|
{% call form_wrapper() %}
|
|
{{ form.email_address(
|
|
param_extensions={
|
|
"hint": {"text": "This should be a shared inbox managed by your team, not your own email address"},
|
|
"classes": "govuk-!-width-full"
|
|
},
|
|
error_message_with_html=True
|
|
) }}
|
|
{% if not show_choice_of_default_checkbox %}
|
|
<p class="form-group">
|
|
This is the default reply-to address for {{ current_service.name }} emails
|
|
</p>
|
|
{{ page_footer('Save') }}
|
|
{% else %}
|
|
{{ form.is_default }}
|
|
{{ page_footer(
|
|
'Save',
|
|
delete_link=url_for('.service_confirm_delete_email_reply_to', service_id=current_service.id, reply_to_email_id=reply_to_email_address_id),
|
|
delete_link_text='Delete'
|
|
) }}
|
|
{% endif %}
|
|
{% endcall %}
|
|
|
|
{% endblock %}
|