Opened 15 years ago

Closed 12 years ago

#9460 closed New feature (fixed)

Template blocks for submit buttons in admin's change view

Reported by: kosmik Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords: admin, submit, buttons, template
Cc: bernhard.bender@…, Jari Pennanen, andy@…, rvdrijst Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Having the submit buttons inside their own template blocks in admin/change_form.html would be useful when one wants to customize the buttons. It is of course possible to override the "content" block but that block has quite a lot of code and copying it would be very unefficient. The template block approach seems to be the simplest one. Another option would be to enable overriding the admin/submit_line.html template.

Attachments (3)

submit_button_blocks_r9290.diff (1.2 KB ) - added by kosmik 15 years ago.
Adds blocks around the top and bottom submit buttons.
change_form.diff (1.6 KB ) - added by Jari Pennanen 15 years ago.
more blocks
change_form_all_in_blocks.diff (2.4 KB ) - added by Jari Pennanen 15 years ago.
Even more blocks! Now all is customizable.

Download all attachments as: .zip

Change History (21)

by kosmik, 15 years ago

Adds blocks around the top and bottom submit buttons.

comment:1 by bernhard.bender@…, 15 years ago

Cc: bernhard.bender@… added

While you're at it, please inclose the reming section of admin/change_form.html in their own blocks.
I need the submit line block, and would also like to see the remaining parts block'ed.

-Bernhard

in reply to:  1 comment:2 by kosmik, 15 years ago

Which parts in particular would you to have inside their own blocks? I looked at the template but didn't see any places where further blocks would help. Maybe it would be possible for you to create a patch yourself? That's almost easier than trying to explain the required changes to me or someone else.

comment:3 by Niels Sandholt Busch, 15 years ago

Cc: niels.busch@… added

comment:4 by Niels Sandholt Busch, 15 years ago

Cc: niels.busch@… removed

comment:5 by Karen Tracey, 15 years ago

#10283 looks like a similar request and also contains a patch.

comment:6 by Jari Pennanen, 15 years ago

My patch includes more blocks, I support the idea of having customizable errors too! And, the submit_row_top should be outside the if, if you ask me!

by Jari Pennanen, 15 years ago

Attachment: change_form.diff added

more blocks

by Jari Pennanen, 15 years ago

Even more blocks! Now all is customizable.

comment:7 by Jari Pennanen, 15 years ago

Cc: ciantic@… added

comment:8 by Jari Pennanen, 15 years ago

Component: Contrib appsdjango.contrib.admin
milestone: post-1.0
Version: 1.0SVN

comment:9 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:10 by Jacob, 15 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:11 by anonymous, 15 years ago

Cc: andy@… added

comment:12 by rvdrijst, 15 years ago

Cc: rvdrijst added

comment:13 by Jacob, 15 years ago

milestone: 1.11.2

comment:14 by James Bennett, 14 years ago

milestone: 1.2

1.2 is feature-frozen, moving this feature request off the milestone.

comment:15 by Jari Pennanen, 14 years ago

Cc: Jari Pennanen added; ciantic@… removed

comment:16 by patchhammer, 13 years ago

Easy pickings: unset
Patch needs improvement: set
Severity: Normal
Type: Uncategorized

change_form_all_in_blocks.diff fails to apply cleanly on to trunk

comment:17 by Luke Plant, 13 years ago

Type: UncategorizedNew feature

comment:18 by Ramiro Morales, 12 years ago

Resolution: fixed
Status: newclosed

In [16956]:

Fixed #9460 -- Added template blocks for submit buttons rows in admin app model add/change views.

This allows for easier customization. Thanks kosmik for report and patch.

Refs #13875.

Note: See TracTickets for help on using tickets.
Back to Top