From 6ef9750adef894a11001b959ba0f31def1f3fdd4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 28 Apr 2021 09:55:25 +0200 Subject: WIP: preventive forms --- .../templates/ishtar/forms/base_form.html | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ishtar_common/templates/ishtar/forms/base_form.html (limited to 'ishtar_common/templates/ishtar/forms/base_form.html') diff --git a/ishtar_common/templates/ishtar/forms/base_form.html b/ishtar_common/templates/ishtar/forms/base_form.html new file mode 100644 index 000000000..fb1fc997f --- /dev/null +++ b/ishtar_common/templates/ishtar/forms/base_form.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} +{% load i18n inline_formset table_form from_dict %} +{% block extra_head %} +{{form.media}} +{% endblock %} + +{% block pre_container %} +
{% csrf_token %} +{% endblock %} +{% block content %} +

{{page_name}}

+
+ {% if form.non_field_errors or form.errors %} +
+
+ {% trans "Error on validation. Check all your fields. Modification not saved." %} +
+ {% for key, error_details in form.errors.items %} + {% with field=key|from_dict:form.fields %}{{ field.label }}{{error_details}}{% endwith %} + {% endfor %} +
+ {% endif %} + {% block form_head %} + {% endblock %} + {% bs_form form 0 True %} + {% for inline in inline_forms %} + {% bs_formset inline 0 True %} + {% endfor %} +
+{% endblock %} + +{% block footer %} + +
+{% endblock %} + -- cgit v1.2.3