Opened 11 years ago
Closed 10 years ago
#22736 closed Uncategorized (needsinfo)
Preserve POPUP state when using 'save and continue' from model change form inside POPUP?
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.6 |
Severity: | Normal | Keywords: | admin, popup, change form, _continue |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When showing an admin change form inside a popup (opened with "return showAddAnotherPopup()") and using the 'save and continue' behavior (name="_continue" on the submit button) the popup context is lost in the redirect in contrib.admin.options.py, ln 972.
Would you consider this as unexpected behavior and if so, would it be interesting to preserve that state?
Change History (5)
follow-up: 3 comment:1 by , 11 years ago
comment:2 by , 11 years ago
Yes, I customized it to achieve this behavior. It makes more sense in my use case than returning to the change list (or closing the popup right away after saving). I thought it would be nice if the popup context remained in that scenario as well.
-- Edit --
A bit more about the use case. I have a change list that amongst other data displays a thumbnail of an extended file object. The change list itself is connected to another content type than this particular file object, but still it is very convenient to be able to edit the file's metadata (only 3 text inputs) without having to leave the context of that change list.
So I tried to open the edit page for the file inside a popup. In this use case it puzzles the user (just admins, but this change list is used a lot) to be returned to the change list page of the file objects after hitting save in the popup), because it isn't accessed in this context. Closing the popup right away isn't convenient either, because many users prefer to take a glance after saving and then closing manually (especially because the changed values are nowhere to be seen on the change list page that opens the popup, so closing it right away causes uncertainty about the correctness of the saved values)
comment:3 by , 11 years ago
comment:4 by , 11 years ago
What do you mean by "popup context"? Did you have a look if overriding templates/admin/popup_response.html
might help? There's JavaScript logic there which closes the popup if that's what you're trying to avoid.
comment:5 by , 10 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
How do you get a save and continue button on the pop-up? Are you using a custom template? I don't think the pop-up is really designed to be used like that.