Code

Opened 8 years ago

Closed 7 years ago

#1657 closed defect (fixed)

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

Reported by: fgutierrez@… Owned by: adrian
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.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by mtredinnick

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 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in newforms.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.