{% load i18n creme_widgets %}{% load or_op from creme_core_tags %} {% with form=wizard.form steps=wizard.steps %} {% block title %}
{% widget_icon name=icon_name size='brick-hat-bar' label=icon_label|or_op:title %}

{% blocktranslate with current_step=steps.step1 step_count=steps.count %}{{title}}: step {{current_step}} of {{step_count}}{% endblocktranslate %}

{% endblock %} {% if help_message %} {% widget_help_sign message=help_message %} {% endif%} {% if not is_inner_popup %} {% endif %}

{% translate 'Fields marked with * are required.' %}

{% csrf_token %} {{form.media}} {{wizard.management_form}} {% comment %} TODO {% if cancel_url %}{% endif %} {% if callback_url_name %}{% endif %} {% endcomment %} {% for hidden in form.hidden_fields %} {% if hidden.errors %}

{{hidden.label}} : {{hidden.errors}}{{hidden}}

{% else %} {{hidden}} {% endif %} {% endfor %} {% if form.non_field_errors %}
{% translate 'Global errors' %}
{{form.non_field_errors}}
{% endif %} {% block main_content %} {% if form.forms %}{# TODO: improve this case #} {{form.management_form}} {% for subform in form.forms %} {{subform.as_p}} {% endfor %} {% else %} {% include 'creme_core/generics/blockform/field-blocks.html' %} {% endif %} {% endblock %} {% block submit_buttons %}
{% if not is_inner_popup %} {% if steps.prev %} {% if steps.count > 2 %} {% endif %} {% endif %} {# TODO ? {% if cancel_url %}{% translate 'Cancel' %}{% endif %} #} {% else %} {% if steps.prev %} {% if steps.count > 2 %} {% if steps.step1 > 2 %} {% endif %} {% else %} {% endif %} {% endif %} {% endif %}
{% endblock %}
{% endwith %}