summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/blocks
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-04-28 09:55:25 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:47 +0200
commitfd232fdba395c96564934052233dd23604082693 (patch)
tree5284082668976459d1b304532f883aad0f8044a9 /ishtar_common/templates/blocks
parentde4a4dc7b9d7a227a4e48323db878c3db156389c (diff)
downloadIshtar-fd232fdba395c96564934052233dd23604082693.tar.bz2
Ishtar-fd232fdba395c96564934052233dd23604082693.zip
WIP: preventive forms
Diffstat (limited to 'ishtar_common/templates/blocks')
-rw-r--r--ishtar_common/templates/blocks/bs_formset_snippet.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/ishtar_common/templates/blocks/bs_formset_snippet.html b/ishtar_common/templates/blocks/bs_formset_snippet.html
new file mode 100644
index 000000000..0d089ee1b
--- /dev/null
+++ b/ishtar_common/templates/blocks/bs_formset_snippet.html
@@ -0,0 +1,26 @@
+{% load i18n from_dict %}
+<div class="form-row">
+ {% for form in formset %}
+ {% if form.non_field_errors and not no_error %}
+ <div class="alert alert-danger" role="alert">
+ {{form.non_field_errors}}
+ </div>
+ {% endif %}
+
+ {% for hidden in form.hidden_fields %}
+ {{hidden}}
+ {% if hidden.errors %}<div class="invalid-feedback">
+ {{ hidden.errors }}
+ </div>{% endif %}
+ {% endfor %}
+
+ {% csrf_token %}
+ {% for field in form.visible_fields %}
+ {% include "blocks/bs_field_snippet.html" %}
+ {% endfor %}
+
+ {% if form.extra_render %}
+ {{form.extra_render|safe}}
+ {% endif %}
+ {% endfor %}
+</div>