Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#12260 closed (fixed)

bug -- CSS class messes up ModelMultipleChoiceField in contrib.admin

Reported by: Tim Valenta Owned by: Tim Valenta
Component: contrib.admin Version: dev
Severity: Keywords: css, admin, ModelMultipleChoiceField
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The admin CSS file at trunk/django/contrib/admin/media/css/forms.css has a rule definition for any HTML label element under an .aligned class element.

This really messes up the ModelMultipleChoiceField on admin pages, because the checkboxes use label elements too. The result is a goofy 'step' effect, with a big waterfall of checkboxes leading across the page.

This patch puts adds an extra CSS 2.0-compliant rule which 'undoes' the effect on labels which are nested in a ul tag.

Simple addition:

.aligned ul label {
    float: none;
    width: auto;
}

Attachments (2)

admin-forms.css.diff (441 bytes ) - added by Tim Valenta 14 years ago.
Adds a CSS rule to forms.css in the admin media files. (fixed indentation inconsistency)
admin-forms.css.2.diff (463 bytes ) - added by Tim Valenta 14 years ago.
Updated patch-- missed a CSS rule

Download all attachments as: .zip

Change History (8)

by Tim Valenta, 14 years ago

Attachment: admin-forms.css.diff added

Adds a CSS rule to forms.css in the admin media files. (fixed indentation inconsistency)

comment:1 by Tim Valenta, 14 years ago

Owner: changed from nobody to Tim Valenta
Status: newassigned

comment:2 by Tim Valenta, 14 years ago

Summary: CSS class messes up ModelMultipleChoiceField in contrib.adminbug -- CSS class messes up ModelMultipleChoiceField in contrib.admin
Triage Stage: UnreviewedAccepted

Issue is an honest 'bug', so I moved it into 'Accepted' right away.

by Tim Valenta, 14 years ago

Attachment: admin-forms.css.2.diff added

Updated patch-- missed a CSS rule

comment:3 by Jacob, 14 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [12918]) Fixed #12260 -- Corrected CSS when using checkbox widgets on a ModelMultipleChoiceField in admin. Thanks to tiliv for the report and fix.

comment:5 by Russell Keith-Magee, 14 years ago

(In [12919]) [1.1.X] Fixed #12260 -- Corrected CSS when using checkbox widgets on a ModelMultipleChoiceField in admin. Thanks to tiliv for the report and fix.

Backport of r12918 from trunk.

comment:6 by Jacob, 12 years ago

milestone: 1.2

Milestone 1.2 deleted

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