diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-21 22:49:56 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-21 22:49:56 +0200 |
| commit | a82ae23015f8036919bae3c4a4e133e9045e6fcc (patch) | |
| tree | 38ca8553def343f8aede7af10253286476c7eb24 /ishtar_common/templates | |
| parent | af719ae697e5b03582b28f8a59eae39524cb8f7f (diff) | |
| download | Ishtar-a82ae23015f8036919bae3c4a4e133e9045e6fcc.tar.bz2 Ishtar-a82ae23015f8036919bae3c4a4e133e9045e6fcc.zip | |
Djangoization - Major refactoring (step 14)
* Fix formset UI.
* Fix formset towns.
* Clean-up
Diffstat (limited to 'ishtar_common/templates')
6 files changed, 17 insertions, 15 deletions
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html index c379d8fbb..e2abc80b6 100644 --- a/ishtar_common/templates/ishtar/wizard/default_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html @@ -29,7 +29,7 @@ {% for formsetform in wizard.form.forms %} {% table_form formsetform %} {% endfor %} - <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{form_step}}">{% trans "Add/Modify" %}</button></td></tr></li> + <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li> </table> {% else %} <table> diff --git a/ishtar_common/templates/ishtar/wizard/search.html b/ishtar_common/templates/ishtar/wizard/search.html index 7ed214a48..6bb82abdd 100644 --- a/ishtar_common/templates/ishtar/wizard/search.html +++ b/ishtar_common/templates/ishtar/wizard/search.html @@ -7,7 +7,7 @@ {% block content %} <h2>{{wizard_label}}</h2> <ul id='form_path'> - <li class='current'>» <a href='#'>{{form.form_label}}</a></li> + <li class='current'>» <a href='#'>{{current_step.form_label}}</a></li> </ul> <div class='form'> {% if wizard.form.forms %} @@ -18,7 +18,7 @@ {% for formsetform in wizard.form.forms %} {{ formsetform.as_table }} {% endfor %} - <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{form_step}}">{% trans "Add/Modify" %}</button></td></tr></li> + <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li> </table> {% else %} <table> diff --git a/ishtar_common/templates/ishtar/wizard/towns_wizard.html b/ishtar_common/templates/ishtar/wizard/towns_wizard.html index 115ac9838..cd40e6049 100644 --- a/ishtar_common/templates/ishtar/wizard/towns_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/towns_wizard.html @@ -1,10 +1,11 @@ -{% extends "default_wizard.html" %} +{% extends "ishtar/wizard/default_wizard.html" %} {% load i18n %} {% load range %} {% block extra_head %} -{{form.media}} +{{wizard.form.media}} {% endblock %} {% block content %} +<h2>{{wizard_label}}</h2> <form action="." method="post" name='wizard'>{% csrf_token %} <ul id='form_path'> {% for step in previous_steps %} @@ -13,20 +14,21 @@ <li class='current'>» <a href='#'>{{current_step.form_label}}</a></li> </ul> <div class='form'> -{% if extra_context.TOWNS %} -{% if form.forms %} +{% if TOWNS %} +{% if wizard.form.forms %} <div class='top_button'><input type="submit" id="submit_form" value="{% trans "Validate" %}"/></div> <table class='formset'> - {%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 %} + {{ wizard.management_form }} + {%if wizard.form.non_form_errors%}<tr class='error'><th colspan='2'>{{wizard.form.non_form_errors}}</th></tr>{%endif%} + {{ wizard.form.management_form }} + {% for formsetform in wizard.form.forms %} {{ formsetform.as_table }} {% endfor %} - <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{form_step}}">{% trans "Add/Modify" %}</button></td></tr></li> + <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li> </table> {% else %} <table> - {{ form.as_table }} + {{ wizard.form.as_table }} </table> {% endif %} {% else %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html b/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html index 53650dafe..ad069a738 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html @@ -1,4 +1,4 @@ -{% extends "wizard_done.html" %} +{% extends "ishtar/wizard/wizard_done.html" %} {% load i18n %} {% block content %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html b/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html index 66a572542..2b907ffc6 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html @@ -1,4 +1,4 @@ -{% extends "wizard_done.html" %} +{% extends "ishtar/wizard/wizard_done.html" %} {% load i18n %} {% block content %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html b/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html index 6cbafb930..c6be97b64 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html @@ -1,4 +1,4 @@ -{% extends "wizard_done.html" %} +{% extends "ishtar/wizard/wizard_done.html" %} {% load i18n %} {% block content %} |
