{% extends "ishtar/wizard/default_wizard.html" %}
{% load i18n %}
{% load range %}
{% block extra_head %}
{{wizard.form.media}}
{% endblock %}
{% block wizard_form %}
<form action="." method="post">{% csrf_token %}
<div class='form'>
{% if TOWNS %}
{% if wizard.form.forms %}
<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'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans "No town set in the associated file." %}</p>
{% endif %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
{% block "validation_bar" %}
{% include 'ishtar/wizard/validation_bar.html' %}
{% endblock %}
</div>
</form>
{% endblock %}
