diff options
| author | Diego MartÃn <diegomartinpi@gmail.com> | 2016-10-28 19:21:45 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-22 11:48:37 -0500 |
| commit | abd434059e1aaff35bc848998ad2335c630ba434 (patch) | |
| tree | cf245a9bb74bac786b71f02d7a6915050e2277a3 /django/forms | |
| parent | f62abfc03da61977bf080163f0a2ef014decd86a (diff) | |
Fixed #27250 -- Removed 'for ="..."' from CheckboxSelectMultiple's <label>.
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/widgets.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 7c7e2c90fe..5c593cca71 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -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): """ |
