diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-18 17:49:57 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-18 17:51:30 +0200 |
commit | ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3 (patch) | |
tree | 4136673563f802d6de992512e3c4adde86ef2a4e /ishtar_common/templates/form_snippet.html | |
parent | 9a3d3dcbca9395c00e55d6ee4909ba9b9a4752f8 (diff) | |
download | Ishtar-ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3.tar.bz2 Ishtar-ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3.zip |
Djangoization - Major refactoring (step 1)
Diffstat (limited to 'ishtar_common/templates/form_snippet.html')
-rw-r--r-- | ishtar_common/templates/form_snippet.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ishtar_common/templates/form_snippet.html b/ishtar_common/templates/form_snippet.html new file mode 100644 index 000000000..2f841e078 --- /dev/null +++ b/ishtar_common/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 %} |