Opened 16 years ago

Closed 16 years ago

#9074 closed (fixed)

The submit line on a change form in the admin site is not rendered correctly if it only contains the Save button

Reported by: John Shimek Owned by: nobody
Component: Contrib apps Version: dev
Severity: Keywords: newforms-admin
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have a custom template/view/form in the admin site which only has the save button in the submit row. The gray box that should contain all the buttons is collapses with the Save button rendered over/below the gray box. See the attached image for a screenshot. I am also attaching my template, view, and form to ease reproducing.

The issue seems to stem from "float: right" set to the button with "input[type=submit].default" in admin/media/globals.css. Removing the "float: right" though makes the save button appear as the left most button with multiple buttons on the submit row and the delete button is messed up. To fix that, I also updated the submit_line.html template to have the Save button last in the list.

Attachments (4)

save button.png (48.2 KB ) - added by John Shimek 16 years ago.
Screenshot of issue
views.py (622 bytes ) - added by John Shimek 16 years ago.
example views.py to reproduce
upload_zip_file.html (621 bytes ) - added by John Shimek 16 years ago.
example template to reproduce issue
admin.diff (2.3 KB ) - added by John Shimek 16 years ago.
proposed patch

Download all attachments as: .zip

Change History (6)

by John Shimek, 16 years ago

Attachment: save button.png added

Screenshot of issue

by John Shimek, 16 years ago

Attachment: views.py added

example views.py to reproduce

by John Shimek, 16 years ago

Attachment: upload_zip_file.html added

example template to reproduce issue

by John Shimek, 16 years ago

Attachment: admin.diff added

proposed patch

comment:1 by John Shimek, 16 years ago

I found that the popups only have a save button that is rendered correctly. This is because the submit-row div has "overflow: auto;" set for the style in the html. Doing the same in my template solves my issue, but I am wondering if that should then be added to the globals.css instead of set in the html.

comment:2 by Wilson Miner, 16 years ago

Resolution: fixed
Status: newclosed

(In [9039]) Fixed #9074: Added overflow: hidden to the submit-row div to clear the floated contents and avoid collapsing when the Save button is all that's there.

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