From e2bd2e0439cbacb957004839fa1591fbf8946869 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 24 Jul 2017 14:52:52 +0100 Subject: [PATCH] Ensure only one `

` per page, even with errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A page should have only one `

` element. So if there’s an error message, which contains a `

`, it should replace the page’s normal `

` element, rather than sit above it. --- app/templates/views/api/keys.html | 21 ++++++++++----------- app/templates/views/templates/template.html | 8 +++----- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/app/templates/views/api/keys.html b/app/templates/views/api/keys.html index 8293d31cc..95d797331 100644 --- a/app/templates/views/api/keys.html +++ b/app/templates/views/api/keys.html @@ -23,19 +23,18 @@ {% endcall %} {% else %} - +
+
+

+ API keys +

+
+ +
{% endif %} -
-
-

- API keys -

-
- -
{% call(item, row_number) list_table( keys, diff --git a/app/templates/views/templates/template.html b/app/templates/views/templates/template.html index a2638582d..95ea73c83 100644 --- a/app/templates/views/templates/template.html +++ b/app/templates/views/templates/template.html @@ -27,9 +27,7 @@ {% endcall %}
- {% endif %} - - {% if template_delete_confirmation_message %} + {% elif template_delete_confirmation_message %}
{% call banner_wrapper(type='dangerous', subhead=template_delete_confirmation_message[0]) %}

@@ -41,10 +39,10 @@ {% endcall %}

+ {% else %} +

{{ template.name }}

{% endif %} -

{{ template.name }}

-
{% with show_title=False, expanded=True %} {% include 'views/templates/_template.html' %}