Message support

This commit is contained in:
Ludovic Stephan 2020-06-26 14:35:21 +02:00
parent da363f0df0
commit fb06e2005c
2 changed files with 24 additions and 1 deletions

View file

@ -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;

View file

@ -16,8 +16,21 @@
<body>
<div id="container">
{% block container-top %}
<h2>{% if request.site.name %}{{ request.site.name }}{% else %}AuthENS{% endif %} - {% block container-title %}{% endblock %}</h2>
<h2>{% if request.site.name %}{{ request.site.name }}{% else %}AuthENS{% endif %} - {% block container-title %}{% endblock %}</h2>
{% endblock %}
{% if messages %}
{% for message in messages %}
<p class="{{ message.level_tag }}">
{% if 'safe' in message.tags %}
{{ message|safe }}
{% else %}
{{ message }}
{% endif %}
</p>
{% endfor %}
{% endif %}
{% block content %}{% endblock %}
</div>
</body>