From f8be55da89dd5fa8f8d3e2f201215de35815c287 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Wed, 1 Oct 2025 17:13:27 +0200 Subject: [PATCH] Simplify login template See #236 (for context, not for something that's solved by this): > I did just notice that whatever the form validation error on-login is, the > above message is shown. I will fix that at least to make debugging the above > easier in the future. (i.e.: to make it so that if the form data is missing > entirely, you'd get a "this field is required" for both fields) This also gets rid of the lock/person but I don't care enough for those to keep them around. --- templates/bugsink/login.html | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/templates/bugsink/login.html b/templates/bugsink/login.html index 7f355fd..4728d01 100644 --- a/templates/bugsink/login.html +++ b/templates/bugsink/login.html @@ -1,6 +1,7 @@ {% extends "barest_base.html" %} {% load static %} {% load i18n %} +{% load tailwind_forms %} {% block title %}Log in ยท {{ site_title }}{% endblock %} @@ -15,7 +16,9 @@
{% if form.errors %} -
{% translate "Your username and password didn't match. Please try again." %}
+ {% for error in form.non_field_errors %} +
{{ error }}
+ {% endfor %} {% elif next %} {% if user.is_authenticated %} @@ -27,18 +30,10 @@
{% csrf_token %} -
- - - - -
-
- - - - -
+ + {% tailwind_formfield_implicit form.username %} + {% tailwind_formfield_implicit form.password %} +