From fb06e2005c8af515ba32047f4ba6b1bdd4078e97 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Fri, 26 Jun 2020 14:35:21 +0200 Subject: [PATCH] Message support --- authens/static/authens/css/authens.css | 10 ++++++++++ authens/templates/authens/base.html | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/authens/static/authens/css/authens.css b/authens/static/authens/css/authens.css index 4cedbc5..be95245 100644 --- a/authens/static/authens/css/authens.css +++ b/authens/static/authens/css/authens.css @@ -60,6 +60,16 @@ h2 { text-align: center; } +.success { + background: green; + color: white; + width: 100%; + padding: 0.5em; + margin: 0; + font-size: 1.2em; + text-align: center; +} + ul.errorlist { text-align: left; font-size: 0.8em; diff --git a/authens/templates/authens/base.html b/authens/templates/authens/base.html index 19642fd..d9e5ff3 100644 --- a/authens/templates/authens/base.html +++ b/authens/templates/authens/base.html @@ -16,8 +16,21 @@
{% block container-top %} -

{% if request.site.name %}{{ request.site.name }}{% else %}AuthENS{% endif %} - {% block container-title %}{% endblock %}

+

{% if request.site.name %}{{ request.site.name }}{% else %}AuthENS{% endif %} - {% block container-title %}{% endblock %}

{% endblock %} + + {% if messages %} + {% for message in messages %} +

+ {% if 'safe' in message.tags %} + {{ message|safe }} + {% else %} + {{ message }} + {% endif %} +

+ {% endfor %} + {% endif %} + {% block content %}{% endblock %}