Opened 7 years ago

Closed 6 years ago

Last modified 5 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: UI/UX:

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 7 years ago.
Patch for adding css classes to read only fields.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by anonymous

Owner: changed from nobody to javimansilla

Changed 7 years ago by Fabián Ezequiel Gallina

Attachment: bug13038.patch added

Patch for adding css classes to read only fields.

comment:3 Changed 7 years ago by Fabián Ezequiel Gallina

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 Changed 7 years ago by Ramiro Morales

Keywords: pycamp2010 added
Triage Stage: Ready for checkinAccepted

comment:5 Changed 6 years ago by Russell Keith-Magee

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 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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