Skip to content

Commit 88324b0

Browse files
authored
fix: login form errors (#982)
1 parent 99a4c6d commit 88324b0

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/unfold/templates/admin/login.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,20 @@ <h1 class="font-semibold mb-10">
3434

3535
{% include "unfold/helpers/messages.html" %}
3636

37-
{% include "unfold/helpers/messages/errornote.html" with errors=form.errors %}
37+
<div class="flex flex-col gap-4 mb-8 *:mb-0">
38+
{% include "unfold/helpers/messages/errornote.html" with errors=form.errors %}
3839

39-
{% include "unfold/helpers/messages/error.html" with errors=form.non_field_errors %}
40+
{% include "unfold/helpers/messages/error.html" with errors=form.non_field_errors %}
4041

41-
{% if user.is_authenticated %}
42-
{% blocktranslate trimmed asvar message %}
43-
You are authenticated as {{ username }}, but are not authorized to
44-
access this page. Would you like to login to a different account?
45-
{% endblocktranslate %}
42+
{% if user.is_authenticated %}
43+
{% blocktranslate trimmed asvar message %}
44+
You are authenticated as {{ username }}, but are not authorized to
45+
access this page. Would you like to login to a different account?
46+
{% endblocktranslate %}
4647

47-
{% include "unfold/helpers/messages/error.html" with error=message %}
48-
{% endif %}
48+
{% include "unfold/helpers/messages/error.html" with error=message %}
49+
{% endif %}
50+
</div>
4951

5052
{% block login_before %}{% endblock %}
5153

src/unfold/templates/unfold/helpers/messages/errornote.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% load i18n %}
22

33
{% if errors %}
4-
<p class="errornote bg-red-100 mb-8 text-red-600 px-3 py-3 rounded text-sm dark:bg-red-500/20 dark:border-red-500/20 dark:text-red-500">
4+
<p class="errornote bg-red-100 mb-8 text-red-700 px-3 py-3 rounded dark:bg-red-500/20 dark:border-red-500/20 dark:text-red-400">
55
{% if errors.items|length == 1 %}
66
{% translate "Please correct the error below." %}
77
{% else %}

0 commit comments

Comments
 (0)