From f41b22f173bb9c9c331fa9eab2a7a8d47d0a57db Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 4 Apr 2013 20:49:29 +0200 Subject: Inline formset to manage parcels --- ishtar_common/templates/blocks/inline_formset.html | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ishtar_common/templates/blocks/inline_formset.html (limited to 'ishtar_common/templates/blocks/inline_formset.html') diff --git a/ishtar_common/templates/blocks/inline_formset.html b/ishtar_common/templates/blocks/inline_formset.html new file mode 100644 index 000000000..e36405118 --- /dev/null +++ b/ishtar_common/templates/blocks/inline_formset.html @@ -0,0 +1,25 @@ +{% load i18n %} + {% if extra_formset.non_form_errors %}
{{extra_formset.non_form_errors.as_ul}}
{% endif %} + {% if header %} + + {% endif %}{% for frm in formset%}{% if header %} + {% for field in frm.visible_fields%} + {%endfor%} + + {% endif %} + {% if forloop.first and not skip %}{%endif%} + {% if not skip or not forloop.first %}{% endif %}{% for field in frm.visible_fields %} + {% endfor %} + {% if not skip or not forloop.last %}{% endif %}{%endfor%} + {% if not skip %}{% endif %}{% if header %} +
{% trans caption %}
{{field.label}}
+ {% if field.errors %}
{{ field.errors.as_ul }}
{% endif %} + {{ field }} + {# Include the hidden fields in the form #} + {% if forloop.first %} + {{ formset.management_form }} + {% for hidden in frm.hidden_fields %} + {{ hidden }} + {% endfor %} + {% endif %} +
{% endif %} -- cgit v1.2.3