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: sthzg@… 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)

comment:1 by Tim Graham, 10 years ago

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.

comment:2 by Stephan Herzog, 10 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.

Version 0, edited 10 years ago by Stephan Herzog (next)

in reply to:  1 comment:3 by Stephan Herzog, 10 years ago

Replying to timo:

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.

Sorry, I wrote an answer (comment 2) but added a new comment instead of hitting the reply button.

comment:4 by Tim Graham, 10 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 Tim Graham, 10 years ago

Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top