Ensure only one <h1> per page, even with errors

A page should have only one `<h1>` element. So if there’s an error
message, which contains a `<h1>`, it should replace the page’s normal
`<h1>` element, rather than sit above it.
This commit is contained in:
Chris Hill-Scott
2017-07-24 14:52:52 +01:00
parent befe93ec0b
commit e2bd2e0439
2 changed files with 13 additions and 16 deletions

View File

@@ -23,9 +23,6 @@
{% endcall %} {% endcall %}
</div> </div>
{% else %} {% else %}
{% endif %}
<div class="grid-row"> <div class="grid-row">
<div class="column-two-thirds"> <div class="column-two-thirds">
<h1 class="heading-large"> <h1 class="heading-large">
@@ -36,6 +33,8 @@
<a href="{{ url_for('.create_api_key', service_id=current_service.id) }}" class="button align-with-heading">Create an API key</a> <a href="{{ url_for('.create_api_key', service_id=current_service.id) }}" class="button align-with-heading">Create an API key</a>
</div> </div>
</div> </div>
{% endif %}
<div class="body-copy-table"> <div class="body-copy-table">
{% call(item, row_number) list_table( {% call(item, row_number) list_table(
keys, keys,

View File

@@ -27,9 +27,7 @@
</form> </form>
{% endcall %} {% endcall %}
</div> </div>
{% endif %} {% elif template_delete_confirmation_message %}
{% if template_delete_confirmation_message %}
<div class="bottom-gutter"> <div class="bottom-gutter">
{% call banner_wrapper(type='dangerous', subhead=template_delete_confirmation_message[0]) %} {% call banner_wrapper(type='dangerous', subhead=template_delete_confirmation_message[0]) %}
<p> <p>
@@ -41,9 +39,9 @@
</form> </form>
{% endcall %} {% endcall %}
</div> </div>
{% endif %} {% else %}
<h1 class="heading-large">{{ template.name }}</h1> <h1 class="heading-large">{{ template.name }}</h1>
{% endif %}
<div class="grid-row"> <div class="grid-row">
{% with show_title=False, expanded=True %} {% with show_title=False, expanded=True %}