diff options
| 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 |
| commit | 98903300a0e745265b61e5fa7c1fef77b750c351 (patch) | |
| tree | 675156a261746243b20481bb8bdee300cd89f3f7 /ishtar/templates | |
| parent | b4550095d45d58b5bfc5ba2a454529287f396415 (diff) | |
| download | Ishtar-98903300a0e745265b61e5fa7c1fef77b750c351.tar.bz2 Ishtar-98903300a0e745265b61e5fa7c1fef77b750c351.zip | |
Manage unique reference for operations (refs #260) + includetag for forms
Diffstat (limited to 'ishtar/templates')
| -rw-r--r-- | ishtar/templates/default_wizard.html | 21 | ||||
| -rw-r--r-- | ishtar/templates/form_snippet.html | 13 | ||||
| -rw-r--r-- | ishtar/templates/grid_form.html | 10 |
3 files changed, 16 insertions, 28 deletions
diff --git a/ishtar/templates/default_wizard.html b/ishtar/templates/default_wizard.html index 752728ab3..2b8ade350 100644 --- a/ishtar/templates/default_wizard.html +++ b/ishtar/templates/default_wizard.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load i18n %} {% load range %} +{% load table_form %} {% block extra_head %} {{form.media}} {% endblock %} @@ -19,29 +20,13 @@ {%if form.non_form_errors%}<tr class='error'><th colspan='2'>{{form.non_form_errors}}</th></tr>{%endif%} {{ form.management_form }} {% for formsetform in form.forms %} - {% for field in formsetform %} - <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.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> - </tr> - <tr class="help_text" id="{{field.name}}_help"> - <td colspan="3"><div>{{field.help_text}}</div></td> - {%endif%}</tr>{% endfor %} + {% table_form formsetform %} {% endfor %} <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{form_step}}">{% trans "Add/Modify" %}</button></td></tr></li> </table> {% else %} <table> - {% for field in form %} - <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.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> - </tr> - <tr class="help_text" id="{{field.name}}_help"> - <td colspan="3"><div>{{field.help_text}}</div></td> - {%endif%}</tr>{% endfor %} +{% table_form form %} </table> {% endif %} <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> 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 %} diff --git a/ishtar/templates/grid_form.html b/ishtar/templates/grid_form.html deleted file mode 100644 index 8c02197b4..000000000 --- a/ishtar/templates/grid_form.html +++ /dev/null @@ -1,10 +0,0 @@ -{% load i18n %} - {% for field in form %} - <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.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> - </tr> - <tr class="help_text" id="{{field.name}}_help"> - <td colspan="3"><div>{{field.help_text}}</div></td> - {%endif%}</tr>{% endfor %} |
