Opened 13 years ago
Closed 13 years ago
#17152 closed Bug (fixed)
WizardView template documentation incorrect
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.formtools | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/#creating-templates-for-the-forms has sample HTML showing how a wizard could be rendered.
However the this code is missing type="submit" on the buttons.
<button name="wizard_prev_step" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> <button name="wizard_prev_step" value="{{ wizard.steps.prev }}">{% trans "prev step" %}</button>
Attachments (1)
Change History (9)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
Back to 'Accepted' as it needs more than just a trivial doc patch.
comment:4 by , 13 years ago
I think this is also a bad example on how to "go back". If you have a form that has a file field, and you choose a file to upload, and then click "back", it's going to submit the form, meaning your file will be uploaded. Although there's no other way to do it using WizardView
, I think this limitation should be made more obvious (and urge developers to use NamedUrlWizardView
instead which allows you to just use a hyperlink to the previous form.)
by , 13 years ago
Attachment: | 17152.diff added |
---|
comment:5 by , 13 years ago
Has patch: | set |
---|
comment:7 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Actually this is also a problem in the template, not just in the doc: https://code.djangoproject.com/browser/django/trunk/django/contrib/formtools/templates/formtools/wizard/wizard_form.html?rev=16616#L14