From 54d83f529206ba9e62e376dae922aa397d516790 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 7 Jul 2021 09:39:29 +0200 Subject: Preventive file - inline forms --- ishtar_common/templates/base.html | 4 ++++ ishtar_common/templates/blocks/bs_field_snippet.html | 2 +- .../templates/blocks/bs_formset_snippet.html | 20 +++++++++++++++++++- ishtar_common/templates/ishtar/forms/base_form.html | 5 +++++ 4 files changed, 29 insertions(+), 2 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index f9feef533..af4396be3 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -265,6 +265,10 @@
+ diff --git a/ishtar_common/templates/blocks/bs_field_snippet.html b/ishtar_common/templates/blocks/bs_field_snippet.html index dcee87f7f..beecf624f 100644 --- a/ishtar_common/templates/blocks/bs_field_snippet.html +++ b/ishtar_common/templates/blocks/bs_field_snippet.html @@ -1,5 +1,5 @@ {% load i18n %} -
{% if field.label %}{{ field.label_tag }}{% endif %} {% if extra_field_label %}{% endif %} diff --git a/ishtar_common/templates/blocks/bs_formset_snippet.html b/ishtar_common/templates/blocks/bs_formset_snippet.html index 0d089ee1b..3a7e537d3 100644 --- a/ishtar_common/templates/blocks/bs_formset_snippet.html +++ b/ishtar_common/templates/blocks/bs_formset_snippet.html @@ -1,6 +1,9 @@ {% load i18n from_dict %} -
+
+ {{ formset.non_form_errors.as_ul }} + {{ formset.management_form }} {% for form in formset %} +
{% if form.non_field_errors and not no_error %} {% endfor %} + {% if formset.dynamic_add %} +
+
+ +
+
+ + {% endif %}
diff --git a/ishtar_common/templates/ishtar/forms/base_form.html b/ishtar_common/templates/ishtar/forms/base_form.html index fb1fc997f..3f069e7d6 100644 --- a/ishtar_common/templates/ishtar/forms/base_form.html +++ b/ishtar_common/templates/ishtar/forms/base_form.html @@ -23,10 +23,15 @@ {% endif %} {% block form_head %} {% endblock %} + {% block bs_form %} {% bs_form form 0 True %} + {% endblock %} + {% block bs_form_inlines %} {% for inline in inline_forms %} +

{{inline.form_label}}

{% bs_formset inline 0 True %} {% endfor %} + {% endblock %}
{% endblock %} -- cgit v1.2.3