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,19 +23,18 @@
{% endcall %}
</div>
{% else %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">
API keys
</h1>
</div>
<div class="column-one-third">
<a href="{{ url_for('.create_api_key', service_id=current_service.id) }}" class="button align-with-heading">Create an API key</a>
</div>
</div>
{% endif %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">
API keys
</h1>
</div>
<div class="column-one-third">
<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 class="body-copy-table">
{% call(item, row_number) list_table(
keys,