Opened 10 years ago

Closed 10 years ago

#1657 closed defect (fixed)

CheckboxSelectMultipleField renders a "disordered" list ("patch")

Reported by: fgutierrez@… Owned by: Adrian Holovaty
Component: Core (Other) Version: 0.91
Severity: minor Keywords: CheckboxSelectMultipleField
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Since the output of the formfield is defined as:

output.append('<li><input type="checkbox" id="%s" class="v%s" name="%s"%s /> <label for="%s">%s</label></li>' % \

(self.get_id() + value , self.class.name, field_name, checked_html,
self.get_id() + value, choice))

It generates a list that overlaps the checkbox labels with the next checkbox, in order to generate a list that has its elements one under the other that line should render a class="vCheckboxLabel" for the label like this:

(Line 586 of formfields.py in django/core/):

output.append('<li><input type="checkbox" id="%s" class="v%s" name="%s"%s /> <label class="vCheckboxLabel" for="%s">%s</label></li>' % \

(self.get_id() + value , self.class.name, field_name, checked_html,
self.get_id() + value, choice))

Then the list of checkboxes will look ordered.

I saw this when using custom manipulators with the last svn version of 0.91 trunk.

Change History (2)

comment:1 Changed 10 years ago by Malcolm Tredinnick

I cannot replicate this at all. Can you paste a screenshot showing the bug in action (if it still occurs)?

We aren't using CheckboxSelectMultipleField anywhere in core and that class only makes sense in the admin interface, so I'm not really sure what is going on here.

comment:2 Changed 10 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

Fixed in newforms.

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