1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #27250 -- Removed 'for ="..."' from CheckboxSelectMultiple's <label>.

This commit is contained in:
Diego Martín
2016-10-28 19:21:45 +02:00
committed by Tim Graham
parent f62abfc03d
commit abd434059e
2 changed files with 20 additions and 0 deletions

View File

@@ -822,6 +822,13 @@ class CheckboxSelectMultiple(RendererMixin, SelectMultiple):
# never known if the value is actually omitted.
return False
def id_for_label(self, id_):
""""
Don't include for="field_0" in <label> because clicking such a label
would toggle the first checkbox.
"""
return ''
class MultiWidget(Widget):
"""