Files
modoboa/modoboa/templates/common/wizard_forms.html
T
2014-12-03 15:32:19 +01:00

39 lines
1.7 KiB
HTML

{% load i18n form_tags %}
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">{% trans "Close" %}</span></button>
<h3 class="modal-title">{{ title }} / <small>{{ wizard.first_step.title }}</small></h3>
</div>
<div class="modal-body">
<form class="form-horizontal" action="{{ action }}" enctype="{{ enctype }}"
method="POST" id="{{ formid }}" name="{{ formid }}">
{% csrf_token %}
<div id="wizard" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
{% for step in wizard.steps %}
<div id="step{{ forloop.counter }}"
class="item{% if forloop.first %} active{% endif %}">
{% if step.formtpl %}{% render_form step.form step.formtpl %}{% else %}{% render_form step.form %}{% endif %}
</div>
{% endfor %}
</div>
</div>
</form>
</div>
<div class="modal-footer">
<div class="buttons_list">
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
{% for step in wizard.steps %}
<div id="step{{ forloop.counter }}_buttons"
class="bset{% if forloop.first %} active{% endif %}">
{% if step.prev %}<a href="#" class="btn btn-primary prev">{% trans "Previous" %}</a>{% endif %}
{% if step.next %}<a href="#" class="btn btn-primary next">{% trans "Next" %}</a>{% else %}<a href="#" class="btn btn-primary submit">{{ wizard.submit_button_label }}</a>{% endif %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>