From eb7e96c07ad61a6e66fa8fd94f80fa317a99afb0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 26 Nov 2020 13:06:35 +0100 Subject: Refactor custom widgets templates - ISSN/ISBN check --- ishtar_common/templates/ishtar/forms/document.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ishtar_common/templates/ishtar') diff --git a/ishtar_common/templates/ishtar/forms/document.html b/ishtar_common/templates/ishtar/forms/document.html index b3a9a8e15..ed5a39daf 100644 --- a/ishtar_common/templates/ishtar/forms/document.html +++ b/ishtar_common/templates/ishtar/forms/document.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load i18n inline_formset table_form %} +{% load i18n inline_formset table_form from_dict %} {% block extra_head %} {{form.media}} {% endblock %} @@ -11,9 +11,19 @@ {% block content %}

{{page_name}}

+ {% if form.non_field_errors or form.errors %} +
+
+ {% trans "Error on validation. Check all your fields. Modification not saved." %} +
{% for error in form.non_field_errors %}

{{ error }}

{% endfor %} + {% for key, error_details in form.errors.items %} + {% with field=key|from_dict:form.fields %}{{ field.label }}{{error_details}}{% endwith %} + {% endfor %} +
+ {% endif %} {% bs_form form %}
{% endblock %} -- cgit v1.2.3