From bc1632dd1b1f9d84258ed08dd205317598cd00bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sat, 13 Jun 2020 17:14:51 +0200 Subject: [PATCH] Errors deserve CSS too! --- authens/static/authens/css/authens.css | 10 ++++++++++ authens/templates/authens/pwd_login.html | 11 +++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/authens/static/authens/css/authens.css b/authens/static/authens/css/authens.css index 2b64229..35e078e 100644 --- a/authens/static/authens/css/authens.css +++ b/authens/static/authens/css/authens.css @@ -48,6 +48,16 @@ form { font-size: 1.5em; } +.error { + background: red; + color: white; + width: 100%; + padding: 0.5em; + margin: 0; + font-size: 1.2em; + text-align: center; +} + form table { margin: auto; border-spacing: 0.3em; diff --git a/authens/templates/authens/pwd_login.html b/authens/templates/authens/pwd_login.html index 46bbb87..3e82fdf 100644 --- a/authens/templates/authens/pwd_login.html +++ b/authens/templates/authens/pwd_login.html @@ -5,13 +5,20 @@

{% if request.site.name %}{{ request.site.name }}{% else %}AuthENS{% endif %} - {% trans "Connexion par mot de passe" %}

{% if form.errors %} -

{% trans "Nom d'utilisateur et/ou mot de passe incorrect" %}

+

{% trans "Nom d'utilisateur et/ou mot de passe incorrect" %}

{% endif %}
{% csrf_token %} - {{ form.as_table }} + + {% for field in form %} + + + + + {% endfor %} +
{{ field.label_tag }}{{ field }}