#13166 closed (fixed)
Admin change view: ambiguity between action and list_editable form submission
| Reported by: | Paul Smith | Owned by: | Paul Smith |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.2-beta |
| Severity: | Keywords: | admin action list_editable | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The Admin change view can have two simultaneous form interactions if there are actions AND there are list_editable fields. There will be two submit buttons: a 'Go' button for actions and a 'Save' button for list_editable changes (actually it could be three if actions_on_top and actions_on_bottom are both True). In cases where the user might change list_editable elements and hit the 'Go' button, or select an action to execute and hit 'Save', BOTH sets of changes get handled - an ambiguous and confusing situation that could potentially result in unintended consequences.
Attachments (4)
Change History (12)
by , 16 years ago
| Attachment: | modeladmin-12962.diff added |
|---|
comment:1 by , 16 years ago
| Needs tests: | set |
|---|---|
| Patch needs improvement: | set |
| Status: | new → assigned |
comment:2 by , 16 years ago
| Needs tests: | unset |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
| Attachment: | modeladmin-13166-js-warnings.diff added |
|---|
New patch: includes additions to actions.js that warn users when they're submitting ambiguous values.
comment:3 by , 16 years ago
| Patch needs improvement: | unset |
|---|
OK, now we have some tests, old tests have been updated, and there are some JavaScript warnings that will let the user know when they submit ambiguous values. Changing "Needs improvement" - ready to go.
comment:4 by , 16 years ago
| Patch needs improvement: | set |
|---|
The confirmation messages ought to be marked for translation, as documented here: http://docs.djangoproject.com/en/1.1/topics/i18n/internationalization/#specifying-translation-strings-in-javascript-code
by , 16 years ago
| Attachment: | modeladmin-13166-js-warnings-i18n.diff added |
|---|
comment:5 by , 16 years ago
| Patch needs improvement: | unset |
|---|
Updated patch that applies cleanly on r13045, with i18n added in javascript and minification, as required by jezdez.
comment:6 by , 16 years ago
I tested aaugustin's latest patch on my Windows XP system: it applies cleanly, the tests pass, and interacting with the list-editable/actions widgets produce what seem to be the correct set of confirmation dialogs and messages. Looks ok to me.
comment:7 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Initial patch - needs tests, better warnings