summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/wizard/towns_wizard.html
blob: cd40e60497ad84734a9226b91c15398097d75064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends "ishtar/wizard/default_wizard.html" %}
{% load i18n %}
{% load range %}
{% block extra_head %}
{{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 %}
  <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'>
{% if TOWNS %}
{% if wizard.form.forms %}
<div class='top_button'><input type="submit" id="submit_form" value="{% trans "Validate" %}"/></div>
<table class='formset'>
  {{ 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="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li>
</table>
{% else %}
<table>
  {{ wizard.form.as_table }}
</table>
{% endif %}
{% else %}
<p class='alert'>{% trans "No town set in the associated file." %}</p>
{% endif %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
<input type="submit" id="submit_form" value="{% trans "Validate" %}"/>
</div>
</form>
{% endblock %}