#13599 closed (fixed)
Incorrect HTML in change_list when list_editable is used
Reported by: | skevy | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | list_editable, html, rendering, admin | |
Cc: | adam.skevy@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When using list_editable, an "id" form field gets created at the end of each row in the change list. It get's placed in it's own TD (correctly, I might add), but even though the field is hidden, the TD remains (thus causing incorrect rendering, as seen here: http://cl.ly/4d97f294a05facbb895d).
Posted along with this ticket is a patch that simply adds "display:none;" to any TD's containing hidden fields. Simple fix.
Attachments (4)
Change History (13)
by , 15 years ago
Attachment: | hide_td_containing_hidden_input_in_changelist.diff added |
---|
comment:1 by , 15 years ago
Has patch: | set |
---|
comment:2 by , 14 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
I'm not a huge fan of just disappearing the problem -- the hidden field should be rendered such that it doesn't require an extra TD element.
by , 14 years ago
Attachment: | separate_hidden_fields.patch added |
---|
A patch with the hidden inputs placed above the results table
comment:3 by , 14 years ago
I added a patch where the hidden fields are rendered in a hidden div above the table instead.
comment:4 by , 14 years ago
milestone: | → 1.3 |
---|
comment:5 by , 14 years ago
I think most of the possible patches for this problem are kinda ugly - but definitely agree with russel that "hiding" the td is not a good solution. I think magnus's solution is good - and it works just fine.
by , 14 years ago
Attachment: | improved_tests_base.diff added |
---|
comment:6 by , 14 years ago
Patch needs improvement: | unset |
---|
Updated the patch to include jbroon and I's updated tests. Also replace the 'style="display:none"' on the div containing the hidden fields with 'class="hiddenfields"' and some css, to make it less ugly (I hate inline css).
by , 14 years ago
Attachment: | seperate_hidden_fields.patch added |
---|
Separate hidden fields from table w/ updated tests.
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hide's the td containing a hidden input in the changelist.