Files
notifications-admin/app/templates/views/service-settings/email-reply-to/edit.html
Chris Hill-Scott d9da219b7e Use a macro for form tags
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
2018-09-19 12:43:15 +01:00

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 %}