{% extends "base.html" %}
{% load i18n %}
{% load range %}
{% block content %}
<h2>{{wizard_label}}</h2>
<form action="." method="post">{% csrf_token %}
<ul id='form_path'>
{% for step in previous_steps %}
  <li><button name="form_prev_step" value="{{forloop.counter0}}">{{step}}</button></li>
{% endfor %}
  <li class='current'><a href='#'>{{current_step_label}}</a></li>
</ul>
</form>
<form action="." method="post">{% csrf_token %}
<div class='form'>
  {% block "warning_informations" %}{% endblock %}
  <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%}
  <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
  {{ previous_fields|safe }}
  {% if extra_form %}
  <table>
  {{ extra_form }}
  </table>
  {% endif %}
  {% block "extra_informations" %}{% endblock %}

  {% block "footer" %}
  <div id="footer">
    {% block "validation_bar" %}
    <p class="confirm-message">{%if confirm_end_msg %}{{confirm_end_msg|safe}}{%else%}{% trans "Would you like to save them?" %}{%endif%}</p>
    {% include 'ishtar/wizard/validation_bar.html' %}
    {% endblock %}
    {% include 'ishtar/blocks/footer.html' %}
  </div>
  {% endblock %}

</div>
</form>
{% endblock %}
