Opened 4 weeks ago

Last modified 4 weeks ago

#29376 new Uncategorized

admin adjustability improvement: Take into account `show_save_and_add_another` context var

Reported by: Mihas Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

To provide better adjustability, to introduce new context var - show_save_and_add_another.
E.g. if I want to hide button "Save and add another", I can just modify extra_context - write False to the variable.

For other buttons - "Save" and "Save and continue editing", this already works exactly in this manner.

Change History (4)

comment:1 Changed 4 weeks ago by Carlton Gibson

Has patch: set

comment:2 Changed 4 weeks ago by Claude Paroz

Needs tests: set

comment:3 Changed 4 weeks ago by Carlton Gibson

The options for Save and Save and continue were originally added to ensure correct behaviour when hitting Save New and getting a validation error. See 0894643e4. They weren't really for direct usage...

... however, maybe it's reasonable. Tentatively Accept to see how the patch turns out, and what others think.

This isn't really documented (like much around extending the admin). Not sure where it would go if we were to add something.

comment:4 Changed 4 weeks ago by Carlton Gibson

Patch needs improvement: set
Triage Stage: UnreviewedAccepted
Note: See TracTickets for help on using tickets.
Back to Top