summaryrefslogtreecommitdiff
path: root/ishtar/templates/form_snippet.html
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2011-06-13 18:40:44 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2011-06-13 18:40:44 +0200
commitbff51ab31ab626c46c60c41a202350f8f29b6a78 (patch)
tree675156a261746243b20481bb8bdee300cd89f3f7 /ishtar/templates/form_snippet.html
parente29d35c908113bed814fc061e9cd1aa235188ec6 (diff)
downloadIshtar-bff51ab31ab626c46c60c41a202350f8f29b6a78.tar.bz2
Ishtar-bff51ab31ab626c46c60c41a202350f8f29b6a78.zip
Manage unique reference for operations (refs #260) + includetag for forms
Diffstat (limited to 'ishtar/templates/form_snippet.html')
-rw-r--r--ishtar/templates/form_snippet.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/ishtar/templates/form_snippet.html b/ishtar/templates/form_snippet.html
new file mode 100644
index 000000000..2f841e078
--- /dev/null
+++ b/ishtar/templates/form_snippet.html
@@ -0,0 +1,13 @@
+{% load i18n %}
+ {% if form.non_field_errors %}<tr class='errors'>
+ <td colspan='3'>{{form.non_field_errors}}</td>
+ </tr>{%endif%}
+ {% for field in form %}{% if not field.is_hidden %}
+ <tr{% if field.field.required %} class='required'{% endif %}>
+ <th>{{ field.label_tag }}</th>
+ <td> {{ field.errors }}{{field|safe}}</td>{% if field.help_text %}
+ <td><a href="#{{field.auto_id}}" class="help_display" title="{% trans "Help"%}">?</a></td>
+ </tr>
+ <tr class="help_text" id="{{field.auto_id}}_help">
+ <td colspan="3"><div>{{field.help_text}}</div></td>
+ {%endif%}</tr>{% else %}{{field}}{% endif %}{% endfor %}