Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#13038 closed (fixed)

readonly_fields in an Admin changeform don't have their name added as a HTML class

Reported by: Andy Baker Owned by: javimansilla
Component: contrib.admin Version: 1.2-beta
Severity: Keywords: admin changeform readonly_field pycamp2010
Cc: andy@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

A normal field is wrapped by:
<div class="form-row fieldname">

Read-only fields are wrapped by:
<div class="form-row">

This limits the possibilities for CSS/javascript customization of admin forms.

Attachments (1)

bug13038.patch (3.3 KB ) - added by Fabián Ezequiel Gallina 14 years ago.
Patch for adding css classes to read only fields.

Download all attachments as: .zip

Change History (7)

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

Triage Stage: UnreviewedAccepted

comment:2 by anonymous, 14 years ago

Owner: changed from nobody to javimansilla

by Fabián Ezequiel Gallina, 14 years ago

Attachment: bug13038.patch added

Patch for adding css classes to read only fields.

comment:3 by Fabián Ezequiel Gallina, 14 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

Attached is the patch for this ticket.

Credits to javimansilla and fisadev for the original patch.

I have added tests and improved blank spaces in the right of css classes.

comment:4 by Ramiro Morales, 14 years ago

Keywords: pycamp2010 added
Triage Stage: Ready for checkinAccepted

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

Resolution: fixed
Status: newclosed

(In [12922]) Fixed #13038 -- Ensured that readonly fields in the admin have their name added as a CSS class. Thanks to andybak for the report, and javimansilla, fisadev and fgallina for their work on the patch.

comment:6 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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