mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-03 18:08:24 -04:00
This will stop us repeatedly forgetting to add `novalidate` and `autocomplete='off'` to our forms (which is how most of them are set up). It uses sensible defaults, based on how we most-commonly configure forms: - most of our forms are `post`ed (but this can be overridden) - `autocomplete` should only be enabled where it makes sense, otherwise it’s more annoying than useful (but this can be overriden) - we should never be using HTML5 form validation because our own error styles and messages are better
58 lines
1.8 KiB
HTML
58 lines
1.8 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/banner.html" import banner_wrapper %}
|
|
{% from "components/textbox.html" import textbox %}
|
|
{% from "components/checkbox.html" import checkbox %}
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
{% from "components/form.html" import form_wrapper %}
|
|
|
|
{% block service_page_title %}
|
|
Edit email reply to address
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
{% if confirm_delete %}
|
|
<div class="bottom-gutter">
|
|
{% call banner_wrapper(type='dangerous', subhead="Are you sure you want to delete this email reply-to address?") %}
|
|
<form method='post'>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<input type="submit" class="button" name="delete" value="Confirm" />
|
|
</form>
|
|
{% endcall %}
|
|
</div>
|
|
{% else %}
|
|
<h1 class="heading-large">
|
|
Edit email reply to address
|
|
</h1>
|
|
{% endif %}
|
|
{% call form_wrapper() %}
|
|
{{ textbox(
|
|
form.email_address,
|
|
width='2-3',
|
|
safe_error_message=True
|
|
) }}
|
|
{% if form.is_default.data %}
|
|
<p class="form-group">
|
|
This is the default reply-to address for {{ current_service.name }} emails
|
|
</p>
|
|
{{ page_footer(
|
|
'Save',
|
|
back_link=url_for('.service_email_reply_to', service_id=current_service.id),
|
|
back_link_text='Back'
|
|
) }}
|
|
{% else %}
|
|
<div class="form-group">
|
|
{{ checkbox(form.is_default) }}
|
|
</div>
|
|
{{ page_footer(
|
|
'Save',
|
|
back_link=url_for('.service_email_reply_to', service_id=current_service.id),
|
|
back_link_text='Back',
|
|
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 %}
|