Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#13510 closed (fixed)

Row level errors on ModelForms in the admin mess up colspans

Reported by: KyleMac Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Row level errors on ModelForms in the admin have their colspan set based on the number of fields on the model rather than what are actually being displayed in the admin, i.e. it doesn't take into account editable=False (and maybe excludes too). This can lead to the some display issues.

Also when row level errors are displayed the colspan on the "add another" row reverts to 1.

A screenshot shows it best.

Attachments (2)

django admin.png (64.8 KB ) - added by KyleMac 14 years ago.
13510_tabular_inline_errors_colspan.diff (5.0 KB ) - added by Julien Phalip 13 years ago.

Download all attachments as: .zip

Change History (8)

by KyleMac, 14 years ago

Attachment: django admin.png added

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

Triage Stage: UnreviewedAccepted

by Julien Phalip, 13 years ago

comment:2 by Julien Phalip, 13 years ago

Has patch: set
milestone: 1.3

In fact here the colspan should be 4, not 3 (there's an invisible cell containing a hidden field). The attached patch should fix this problem.

comment:3 by Ramiro Morales, 13 years ago

Resolution: fixed
Status: newclosed

In [15626]:

Fixed #13510 -- Corrected colspan of non-field-specific error messages in admin app tabular inlines so it isn't greater than the actual number of field cells. Thanks KyleMac for the report and Julien Phalip for the patch fixing the issue.

comment:4 by Ramiro Morales, 13 years ago

In [15627]:

[1.2.X] Fixed #13510 -- Corrected colspan of non-field-specific error messages in admin app tabular inlines so it isn't greater than the actual number of field cells. Thanks KyleMac for the report and Julien Phalip for the patch fixing the issue.

Backport of [15626] from trunk.

comment:5 by Ramiro Morales, 13 years ago

I couldn't reproduce the Colspan on the "Add another" button row reverting to 1 issue. If you still see it, please open another ticket with more detailed instructions on how to reproduce it.

comment:6 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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