From 9751315b97d47c7b5649860743f0a6944073dc7a Mon Sep 17 00:00:00 2001 From: T'rahk Rokym Date: Fri, 17 Oct 2025 23:15:42 +0200 Subject: [PATCH] Cleaner error display applied to any bootstrap_form in allianceauth Credit to @ppfeufer for the code snipet --- .../templates/django_bootstrap5/field_errors.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 allianceauth/templates/django_bootstrap5/field_errors.html diff --git a/allianceauth/templates/django_bootstrap5/field_errors.html b/allianceauth/templates/django_bootstrap5/field_errors.html new file mode 100644 index 00000000..d447c748 --- /dev/null +++ b/allianceauth/templates/django_bootstrap5/field_errors.html @@ -0,0 +1,11 @@ +{# Template override to display the errors of django Forms when using `boostrap_form` form the `django-bootstrap5` #} +{# library. #} +{# See: https://github.com/zostera/django-bootstrap5/pull/767 #} + +{% if field_errors %} +
+ {% for text in field_errors %} +
{{ text }}
+ {% endfor %} +
+{% endif %}