Opened 13 years ago

Closed 13 years ago

#18477 closed Bug (fixed)

TabularInline admin uses wrong colspan in Add row

Reported by: Jiri Suchan Owned by: nobody
Component: contrib.admin Version: 1.4
Severity: Normal Keywords: javascript, admin
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

Problem:
TabularInline admin generates 'Add another' row via javascript, calculating value of colspan attribute from count of children in first Formset's row. If Formset validation fails, there appears an error message as a first row, which has always only one column. As a result 'Add another' row uses bad value in colspan (1).

Patch uses last row (instead of first one) for calculating colspan attribute.

Attachments (2)

patch_inlines.js (3.8 KB ) - added by Jiri Suchan 13 years ago.
calculate proper colspan for A
inlines_patch.diff (3.8 KB ) - added by Jiri Suchan 13 years ago.
calculate proper colspan for 'Add another' row (once again, proper filename ext.)

Download all attachments as: .zip

Change History (4)

by Jiri Suchan, 13 years ago

Attachment: patch_inlines.js added

calculate proper colspan for A

by Jiri Suchan, 13 years ago

Attachment: inlines_patch.diff added

calculate proper colspan for 'Add another' row (once again, proper filename ext.)

comment:1 by Jiri Suchan, 13 years ago

Type: UncategorizedBug

comment:2 by Julien Phalip <jphalip@…>, 13 years ago

Resolution: fixed
Status: newclosed

In [1ace912f7e1916e03bc91ef91318803817d6a72e]:

Fixed #18477 -- Fixed colspan value when a TabularInline form contains validation errors. Thanks to yedpodtrzitko for the report and patch.

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