From 728e908b4f50f94bb63674311bfa108c096f9dd6 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Jan 2018 17:05:45 +0100 Subject: Add a bs_field template tag --- .../templates/blocks/bs_field_snippet.html | 26 ++++++++++++++++++++++ .../templates/blocks/bs_form_snippet.html | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ishtar_common/templates/blocks/bs_field_snippet.html (limited to 'ishtar_common/templates/blocks') diff --git a/ishtar_common/templates/blocks/bs_field_snippet.html b/ishtar_common/templates/blocks/bs_field_snippet.html new file mode 100644 index 000000000..bf341db8e --- /dev/null +++ b/ishtar_common/templates/blocks/bs_field_snippet.html @@ -0,0 +1,26 @@ +{% load i18n %} +
+ {{ field.label_tag }} + {% if field.help_text %} +
+ {% endif %} + {{field|safe}} + {% if field.help_text %} + + + +
+
+
+ {{field.help_text}} +
+
+ {% endif %} + {% if field.errors %}
+ {{ field.errors }} +
{% endif %} +
diff --git a/ishtar_common/templates/blocks/bs_form_snippet.html b/ishtar_common/templates/blocks/bs_form_snippet.html index eb52fa653..a9042ff67 100644 --- a/ishtar_common/templates/blocks/bs_form_snippet.html +++ b/ishtar_common/templates/blocks/bs_form_snippet.html @@ -7,8 +7,8 @@ {% for hidden in form.hidden_fields %} {{hidden}} -{% if field.errors %}
- {{ field.errors }} +{% if hidden.errors %}
+ {{ hidden.errors }}
{% endif %} {% endfor %} -- cgit v1.2.3