Code

Ticket #7422: widgets.py.diff

File widgets.py.diff, 732 bytes (added by Adrian Ribao <aribao@…>, 6 years ago)

Diff file for widgets.py

Line 
1Index: newforms/widgets.py
2===================================================================
3--- newforms/widgets.py (revisión: 7615)
4+++ newforms/widgets.py (copia de trabajo)
5@@ -367,7 +367,7 @@
6             cb = CheckboxInput(final_attrs, check_test=lambda value: value in str_values)
7             option_value = force_unicode(option_value)
8             rendered_cb = cb.render(name, option_value)
9-            output.append(u'<li><label>%s %s</label></li>' % (rendered_cb,
10+            output.append(u'<li><label for="%s">%s %s</label></li>' % ( cb.attrs['id'], rendered_cb,
11                     conditional_escape(force_unicode(option_label))))
12         output.append(u'</ul>')
13         return mark_safe(u'\n'.join(output))