From e71c18c46fac4499cf081c3c9036983021294c05 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Tue, 18 Mar 2025 23:01:21 +0100 Subject: [PATCH] Fix rendering of form errors --- .../frontend/templates/account/login.html | 2 +- .../frontend/forms/vertical_field.html | 4 ++-- .../frontend/templates/frontend/profile.html | 2 +- .../frontend/templates/includes/form.html | 1 + .../templates/includes/form_errors.html | 18 ++++++++++++++++++ 5 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 src/servala/frontend/templates/includes/form_errors.html diff --git a/src/servala/frontend/templates/account/login.html b/src/servala/frontend/templates/account/login.html index 6494b6a..5a31aea 100644 --- a/src/servala/frontend/templates/account/login.html +++ b/src/servala/frontend/templates/account/login.html @@ -42,4 +42,4 @@ {% include "includes/form.html" %} -{% endblock content %} +{% endblock card_content %} diff --git a/src/servala/frontend/templates/frontend/forms/vertical_field.html b/src/servala/frontend/templates/frontend/forms/vertical_field.html index bcbf8d6..22562d0 100644 --- a/src/servala/frontend/templates/frontend/forms/vertical_field.html +++ b/src/servala/frontend/templates/frontend/forms/vertical_field.html @@ -1,6 +1,6 @@ {% load i18n %}
-
+
{% if field.field.widget.input_type != "checkbox" or field.field.widget.allow_multiple_selected %}
-{% endblock content %} +{% endblock card_content %} diff --git a/src/servala/frontend/templates/includes/form.html b/src/servala/frontend/templates/includes/form.html index d8a01e5..fec4356 100644 --- a/src/servala/frontend/templates/includes/form.html +++ b/src/servala/frontend/templates/includes/form.html @@ -2,6 +2,7 @@
+ {% include "includes/form_errors.html" %} {% csrf_token %} {{ form }}