mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-13 09:50:08 -04:00
> If both sections of the page have errors and the page is submitted, > focus moves to the mobile numbers section so screen reader users may > not be aware of preceding errors - focus should move to a dedicated > error summary at the top of the page. This commit adds the dedicate error summary at the top of the page, following the GOV.UK Elements style from: http://govuk-elements.herokuapp.com/errors/
74 lines
1.9 KiB
HTML
74 lines
1.9 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/banner.html" import banner_wrapper %}
|
||
{% from "components/table.html" import list_table, field, hidden_field_heading %}
|
||
{% from "components/api-key.html" import api_key %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
{% from "components/list-entry.html" import list_entry %}
|
||
|
||
{% block page_title %}
|
||
API integration – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
{% if form.email_addresses.errors or form.phone_numbers.errors %}
|
||
{% call banner_wrapper(type='dangerous') %}
|
||
<h1 class='banner-title'>
|
||
There was a problem with your whitelist
|
||
</h1>
|
||
<p>Fix these errors:</p>
|
||
<ul>
|
||
{% if form.email_addresses.errors %}
|
||
<li>
|
||
<a href="#{{ form.email_addresses.name }}">Enter valid email addresses</a>
|
||
</li>
|
||
{% endif %}
|
||
{% if form.phone_numbers.errors %}
|
||
<li>
|
||
<a href="#{{ form.phone_numbers.name }}">Enter valid phone numbers</a>
|
||
</li>
|
||
{% endif %}
|
||
</ul>
|
||
{% endcall %}
|
||
{% else %}
|
||
<h1 class="heading-large">
|
||
Whitelist
|
||
</h1>
|
||
{% endif %}
|
||
|
||
<p>
|
||
You and members of
|
||
<a href="{{ url_for('main.manage_users', service_id=current_service.id) }}">your team</a>
|
||
are included in the whitelist automatically.
|
||
</p>
|
||
|
||
<form method="post">
|
||
|
||
<div class="grid-row">
|
||
<div class="column-two-thirds">
|
||
|
||
{{ list_entry(
|
||
form.email_addresses,
|
||
item_name='email address',
|
||
autocomplete=False
|
||
) }}
|
||
|
||
{{ list_entry(
|
||
form.phone_numbers,
|
||
item_name='phone number',
|
||
autocomplete=False
|
||
) }}
|
||
|
||
</div>
|
||
</div>
|
||
|
||
{{ page_footer(
|
||
'Save',
|
||
secondary_link=url_for('.api_integration', service_id=current_service.id),
|
||
secondary_link_text='Back to API integration'
|
||
) }}
|
||
|
||
</form>
|
||
|
||
{% endblock %}
|