From 0caeba897e75ddaad6c551b9085087a8e1e72449 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 9 Nov 2017 18:01:38 +0100 Subject: UI: adapt forms --- .../templates/blocks/bs_form_snippet.html | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ishtar_common/templates/blocks/bs_form_snippet.html (limited to 'ishtar_common/templates/blocks/bs_form_snippet.html') diff --git a/ishtar_common/templates/blocks/bs_form_snippet.html b/ishtar_common/templates/blocks/bs_form_snippet.html new file mode 100644 index 000000000..8aa6a5333 --- /dev/null +++ b/ishtar_common/templates/blocks/bs_form_snippet.html @@ -0,0 +1,40 @@ +{% load i18n %} +{% if form.non_field_errors %} + +{%endif%} + +{% for field in form %} +{% if not field.is_hidden %} +{% if forloop.counter0|divisibleby:2 %} +{% if forloop.counter0 %} + {% endif %} +
+{% endif %} +
+ {{ field.label_tag }} + {{field|safe}} + {% if field.errors %}
+ {{ field.errors }} +
{% endif %} + {% if field.help_text %} + +
+
+ {{field.help_text}} +
+
+ {% endif %} +
+{% else %}{{field}} +{% if field.errors %}
+ {{ field.errors }} +
{% endif %} +{% endif %} +{% if forloop.counter0.last%} +
+{% endif %} +{% endfor %} -- cgit v1.2.3