diff options
Diffstat (limited to 'ishtar')
| -rw-r--r-- | ishtar/templates/default_wizard.html | 12 | ||||
| -rw-r--r-- | ishtar/templates/window.html | 9 |
2 files changed, 17 insertions, 4 deletions
diff --git a/ishtar/templates/default_wizard.html b/ishtar/templates/default_wizard.html index c2a42dad5..33eac942c 100644 --- a/ishtar/templates/default_wizard.html +++ b/ishtar/templates/default_wizard.html @@ -19,13 +19,21 @@ {%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 %} - {{ formsetform.as_table }} + {% for field in formsetform %} + <tr{% if field.field.required %} class='required'{% endif %}> + <th><label for="{{ field.label }}">{{ field.label_tag }}</th> + <td> {{ field.errors }}{{field|safe}}</td> + </tr>{% endfor %} {% endfor %} <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{form_step}}">{% trans "Add/Modify" %}</button></td></tr></li> </table> {% else %} <table> - {{ form.as_table }} + {% for field in form %} + <tr{% if field.field.required %} class='required'{% endif %}> + <th><label for="{{ field.label }}">{{ field.label_tag }}</th> + <td> {{ field.errors }}{{field|safe}}</td> + </tr>{% endfor %} </table> {% endif %} <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> diff --git a/ishtar/templates/window.html b/ishtar/templates/window.html index 3c52a3d90..a92f859ab 100644 --- a/ishtar/templates/window.html +++ b/ishtar/templates/window.html @@ -27,12 +27,17 @@ save_and_close_window("{{parent_name}}", "{{parent_pk}}", "{{new_item_label}}", {% endif %} <div id="window_content"> <h3>{{title}}</h3> - <form action="." method="post">{% csrf_token %} + <form action="." method="post" class='form'>{% csrf_token %} <table> - {{form.as_table}} + {% for field in form %} + <tr{% if field.field.required %} class='required'{% endif %}> + <th><label for="{{ field.label }}">{{ field.label_tag }}</th> + <td> {{ field.errors }}{{field|safe}}</td> + </tr>{% endfor %} <tr><td colspan='2' class='submit_button'><input type="submit" id="submit_new_item" value="{% trans "Add" %}"/></td></tr> </table> </form> + </div> </div> </body> |
