summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar
diff options
context:
space:
mode:
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
commitade7bd4b74d9ae42c54648cc7390d8c067b5c5e3 (patch)
tree4136673563f802d6de992512e3c4adde86ef2a4e /ishtar_common/templates/ishtar
parent9a3d3dcbca9395c00e55d6ee4909ba9b9a4752f8 (diff)
downloadIshtar-ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3.tar.bz2
Ishtar-ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3.zip
Djangoization - Major refactoring (step 1)
Diffstat (limited to 'ishtar_common/templates/ishtar')
-rw-r--r--ishtar_common/templates/ishtar/wizard/confirm_wizard.html34
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html44
2 files changed, 78 insertions, 0 deletions
diff --git a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
new file mode 100644
index 000000000..bd80e3967
--- /dev/null
+++ b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load range %}
+{% block content %}
+<form action="." method="post">{% csrf_token %}
+<ul id='form_path'>
+{% for step in previous_steps %}
+ <li>&raquo;&nbsp;<button name="form_prev_step" value="{{forloop.counter0}}">{{step.form_label}}</button></li>
+{% endfor %}
+ <li class='current'>&raquo;&nbsp;<a href='#'>{{current_step.form_label}}</a></li>
+</ul>
+<div class='form'>
+ <p>{%if confirm_msg %}{{confirm_msg|safe}}{%else%}{% trans "You have entered the following informations:" %}{%endif%}</p>
+ {% for form_label, form_data in datas %}
+ <table class='confirm'>
+ <caption>{{form_label}}</caption>
+ {% for label, data, cls in form_data %}
+ <tr{%if cls%} class='{{cls}}'{%endif%}><th>{{label}}</th><td>{{data}}</td></tr>
+ {% endfor %}
+ </table>
+ {% endfor %}
+{{wizard.management_form}}
+ {%if not wizard.form.is_hidden %}
+ <table>
+ {{ wizard.form.as_table }}
+ </table>
+ {%endif%}
+ <p>{%if confirm_end_msg %}{{confirm_end_msg|safe}}{%else%}{% trans "Would you like to save them?" %}{%endif%}</p>
+ <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
+ {{ previous_fields|safe }}
+ <input type="submit" value="{% trans "Validate" %}"/>
+</div>
+</form>
+{% endblock %}
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
new file mode 100644
index 000000000..1996f4e46
--- /dev/null
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -0,0 +1,44 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load range %}
+{% load table_form %}
+{% block extra_head %}
+{{form.media}}
+{% endblock %}
+{% block content %}
+<form action="." method="post" name='wizard'>{% csrf_token %}
+<ul id='form_path'>
+{% for step in previous_steps %}
+ <li>&raquo;&nbsp;<button name="form_prev_step" value="{{forloop.counter0}}">{{step.form_label}}</button></li>
+{% endfor %}
+ <li class='current'>&raquo;&nbsp;<a href='#'>{{current_step.form_label}}</a></li>
+{% for step in next_steps %}
+ <li>&raquo;&nbsp;<button name="form_prev_step" value="{{forloop.counter|add:previous_step_counter}}">{{step.form_label}}</button></li>
+{% endfor %}
+</ul>
+<div class='form'>
+{% if reminder %}<div class='reminder'>{{ reminder }}</div>{%endif%}
+{{ wizard.form.media }}
+{{ wizard.management_form }}
+{% if wizard.form.forms %}
+ {{ wizard.form.management_form }}
+<div class='top_button'><input type="submit" id="submit_form" value="{% trans "Validate" %}"/></div>
+<table class='formset'>
+ {%if wizard.form.non_form_errors%}<tr class='error'><th colspan='2'>{{wizard.form.non_form_errors}}</th></tr>{%endif%}
+ {% 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>
+</table>
+{% else %}
+<table>
+{% table_form wizard.form %}
+</table>
+{% endif %}
+<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
+{{ previous_fields|safe }}
+<input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/>
+{% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
+</div>
+</form>
+{% endblock %}