diff --git a/app/assets/stylesheets/components/banner.scss b/app/assets/stylesheets/components/banner.scss
index e690010f0..f1ef8a107 100644
--- a/app/assets/stylesheets/components/banner.scss
+++ b/app/assets/stylesheets/components/banner.scss
@@ -7,7 +7,7 @@
color: $white;
display: block;
padding: $gutter-half;
- margin: 0 0 $gutter 0;
+ margin: $gutter-half 0 $gutter 0;
text-align: center;
position: relative;
diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html
index 629e79ba3..3bf9b2491 100644
--- a/app/templates/admin_template.html
+++ b/app/templates/admin_template.html
@@ -60,20 +60,8 @@
{% endif %}
{% block content %}
-
- {% with messages = get_flashed_messages(with_categories=true) %}
- {% if messages %}
- {% for category, message in messages %}
- {{ banner(
- message,
- 'default' if category == 'default' else 'dangerous',
- delete_button="Yes, delete this template" if 'delete' == category else None
- )}}
- {% endfor %}
- {% endif %}
- {% endwith %}
- {% block fullwidth_content %}{% endblock %}
+ {% block fullwidth_content %}{% endblock %}
{% endblock %}
diff --git a/app/templates/error/401.html b/app/templates/error/401.html
index 8ea00a7bc..32576ff75 100644
--- a/app/templates/error/401.html
+++ b/app/templates/error/401.html
@@ -1,10 +1,9 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}Unauthorized{% endblock %}
-{% block fullwidth_content %}
-
-
-
401
-
You are not authorized to see this page.
-
-
+{% block maincolumn_content %}
+
+
+
401
+
You are not authorized to see this page.
+
{% endblock %}
diff --git a/app/templates/error/404.html b/app/templates/error/404.html
index d19125683..ebcd6b5b1 100644
--- a/app/templates/error/404.html
+++ b/app/templates/error/404.html
@@ -1,6 +1,6 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}Page not found{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/error/500.html b/app/templates/error/500.html
index 1401cfc53..9bc493ca4 100644
--- a/app/templates/error/500.html
+++ b/app/templates/error/500.html
@@ -1,12 +1,12 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}Server error{% endblock %}
-{% block fullwidth_content %}
-
-
-
- Sorry, we're experiencing technical difficulties
-
-
Try again later.
-
+{% block maincolumn_content %}
+
+
+
+ Sorry, we're experiencing technical difficulties
+
+
Try again later.
+
{% endblock %}
diff --git a/app/templates/flash_messages.html b/app/templates/flash_messages.html
new file mode 100644
index 000000000..aa775c788
--- /dev/null
+++ b/app/templates/flash_messages.html
@@ -0,0 +1,12 @@
+{% from "components/banner.html" import banner %}
+{% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+ {{ banner(
+ message,
+ 'default' if category == 'default' else 'dangerous',
+ delete_button="Yes, delete this template" if 'delete' == category else None
+ )}}
+ {% endfor %}
+ {% endif %}
+{% endwith %}
diff --git a/app/templates/views/add-service.html b/app/templates/views/add-service.html
index b8ce713a4..cd1e90466 100644
--- a/app/templates/views/add-service.html
+++ b/app/templates/views/add-service.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify | Set up service
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/choose-service.html b/app/templates/views/choose-service.html
index 83231eaa0..efb53df79 100644
--- a/app/templates/views/choose-service.html
+++ b/app/templates/views/choose-service.html
@@ -1,11 +1,11 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/browse-list.html" import browse_list %}
{% block page_title %}
GOV.UK Notify | Dashboard
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
Choose service
diff --git a/app/templates/views/email-not-received.html b/app/templates/views/email-not-received.html
index 0ef40ffce..0ebb1e64d 100644
--- a/app/templates/views/email-not-received.html
+++ b/app/templates/views/email-not-received.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/forgot-password.html b/app/templates/views/forgot-password.html
index c4062e6b9..e0dfc0ce6 100644
--- a/app/templates/views/forgot-password.html
+++ b/app/templates/views/forgot-password.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/new-password.html b/app/templates/views/new-password.html
index 16c098cb9..e33632a49 100644
--- a/app/templates/views/new-password.html
+++ b/app/templates/views/new-password.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/password-reset-sent.html b/app/templates/views/password-reset-sent.html
index 6d12e559c..a636ab2f6 100644
--- a/app/templates/views/password-reset-sent.html
+++ b/app/templates/views/password-reset-sent.html
@@ -1,10 +1,10 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}
GOV.UK Notify |
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/register-from-invite.html b/app/templates/views/register-from-invite.html
index 95a90dea2..4fa547344 100644
--- a/app/templates/views/register-from-invite.html
+++ b/app/templates/views/register-from-invite.html
@@ -1,10 +1,10 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}
GOV.UK Notify | Create a user account
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/register.html b/app/templates/views/register.html
index 9bb45a3a8..6febe768c 100644
--- a/app/templates/views/register.html
+++ b/app/templates/views/register.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify | Create an account
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/signedout.html b/app/templates/views/signedout.html
index 81defacfd..4dc931217 100644
--- a/app/templates/views/signedout.html
+++ b/app/templates/views/signedout.html
@@ -1,10 +1,10 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}
GOV.UK Notify | Get started
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/signin.html b/app/templates/views/signin.html
index add765160..9dff86402 100644
--- a/app/templates/views/signin.html
+++ b/app/templates/views/signin.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
Sign in
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/styleguide.html b/app/templates/views/styleguide.html
index 2dde4716a..add35d985 100644
--- a/app/templates/views/styleguide.html
+++ b/app/templates/views/styleguide.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/banner.html" import banner %}
{% from "components/big-number.html" import big_number %}
@@ -13,7 +13,7 @@
Styleguide – GOV.UK Notify
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
Styleguide
diff --git a/app/templates/views/text-not-received-2.html b/app/templates/views/text-not-received-2.html
index 3d0c02dad..550e465a6 100644
--- a/app/templates/views/text-not-received-2.html
+++ b/app/templates/views/text-not-received-2.html
@@ -1,10 +1,10 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}
GOV.UK Notify
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/text-not-received.html b/app/templates/views/text-not-received.html
index f11a051fc..fabe676e8 100644
--- a/app/templates/views/text-not-received.html
+++ b/app/templates/views/text-not-received.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/two-factor.html b/app/templates/views/two-factor.html
index 44cd98739..b047a01f3 100644
--- a/app/templates/views/two-factor.html
+++ b/app/templates/views/two-factor.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify | Text verification
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/user-profile.html b/app/templates/views/user-profile.html
index 45a3f5ea5..0e8b0cd69 100644
--- a/app/templates/views/user-profile.html
+++ b/app/templates/views/user-profile.html
@@ -1,11 +1,11 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/table.html" import list_table, row, field %}
{% block page_title %}
GOV.UK Notify | Your profile
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
Your profile
diff --git a/app/templates/views/verification-not-received.html b/app/templates/views/verification-not-received.html
index 2320950b0..19977aa77 100644
--- a/app/templates/views/verification-not-received.html
+++ b/app/templates/views/verification-not-received.html
@@ -1,10 +1,10 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}
GOV.UK Notify
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/verify-mobile.html b/app/templates/views/verify-mobile.html
index 42e45a2c4..0538c0a5f 100644
--- a/app/templates/views/verify-mobile.html
+++ b/app/templates/views/verify-mobile.html
@@ -1,10 +1,10 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% block page_title %}
GOV.UK Notify | Confirm mobile number
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/views/verify.html b/app/templates/views/verify.html
index 7c4c41180..b6fba7936 100644
--- a/app/templates/views/verify.html
+++ b/app/templates/views/verify.html
@@ -1,4 +1,4 @@
-{% extends "admin_template.html" %}
+{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
@@ -6,7 +6,7 @@
GOV.UK Notify | Confirm email address and mobile number
{% endblock %}
-{% block fullwidth_content %}
+{% block maincolumn_content %}
diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html
index dd1060fa3..1201801b3 100644
--- a/app/templates/withnav_template.html
+++ b/app/templates/withnav_template.html
@@ -1,5 +1,4 @@
{% extends "admin_template.html" %}
-{% from "components/banner.html" import banner %}
{% block fullwidth_content %}
@@ -11,6 +10,7 @@
'Your service is in restricted mode. You can only send notifications to yourself.',
'info'
) }}
+ {% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
diff --git a/app/templates/withoutnav_template.html b/app/templates/withoutnav_template.html
new file mode 100644
index 000000000..82a6b2758
--- /dev/null
+++ b/app/templates/withoutnav_template.html
@@ -0,0 +1,6 @@
+{% extends "admin_template.html" %}
+
+{% block fullwidth_content %}
+ {% include 'flash_messages.html' %}
+ {% block maincolumn_content %}{% endblock %}
+{% endblock %}