Ticket #17152: 17152.diff
File 17152.diff, 2.8 KB (added by , 13 years ago) |
---|
-
docs/ref/contrib/formtools/form-wizard.txt
160 160 This template expects a ``wizard`` object that has various items attached to 161 161 it: 162 162 163 * ``form`` -- The :class:`~django.forms.Form` instance for the current 164 step (either empty or with errors). 163 * ``form`` -- The :class:`~django.forms.Form` or 164 :class:`~django.forms.formset.BaseFormSet` instance for the current step 165 (either empty or with errors). 165 166 166 167 * ``steps`` -- A helper object to access the various steps related data: 167 168 … … 186 187 187 188 {% extends "base.html" %} 188 189 190 {% block head %} 191 {{ wizard.form.media }} 192 {% endblock %} 193 189 194 {% block content %} 190 195 <p>Step {{ wizard.steps.step1 }} of {{ wizard.steps.count }}</p> 191 <form action=" ." method="post">{% csrf_token %}196 <form action="" method="post">{% csrf_token %} 192 197 <table> 193 198 {{ wizard.management_form }} 194 199 {% if wizard.form.forms %} … … 199 204 {% else %} 200 205 {{ wizard.form }} 201 206 {% endif %} 207 </table> 202 208 {% if wizard.steps.prev %} 203 <button name="wizard_prev_step" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>204 <button name="wizard_prev_step" value="{{ wizard.steps.prev }}">{% trans "prev step" %}</button>209 <button name="wizard_prev_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> 210 <button name="wizard_prev_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "prev step" %}</button> 205 211 {% endif %} 206 </table> 207 <input type="submit"> 212 <input type="submit" value="{% trans "submit" %}"/> 208 213 </form> 209 214 {% endblock %} 210 215 -
django/contrib/formtools/templates/formtools/wizard/wizard_form.html
1 {{ wizard.form.media }} 2 1 3 {% load i18n %} 2 4 {% csrf_token %} 3 5 {{ wizard.management_form }} … … 11 13 {% endif %} 12 14 13 15 {% if wizard.steps.prev %} 14 <button name="wizard_prev_step" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>15 <button name="wizard_prev_step" value="{{ wizard.steps.prev }}">{% trans "prev step" %}</button>16 <button name="wizard_prev_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> 17 <button name="wizard_prev_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "prev step" %}</button> 16 18 {% endif %} 17 19 <input type="submit" name="submit" value="{% trans "submit" %}" />