summaryrefslogtreecommitdiff
path: root/django/forms/widgets.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-03-14 11:28:18 -0400
committerTim Graham <timograham@gmail.com>2018-03-15 09:10:23 -0400
commit87dc0844a634360182bcb74d491508111ef8a652 (patch)
tree072b28c846356970202d7dd06a3c845b55ed24cb /django/forms/widgets.py
parentfb8fd535c0f47cffb4da0c5900f3f66e1ec8d432 (diff)
Fixed #29200 -- Fixed label rendering when using RadioSelect and CheckboxSelectMultiple with MultiWidget.
Diffstat (limited to 'django/forms/widgets.py')
-rw-r--r--django/forms/widgets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 50e41b59ec..566bdf25d6 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -621,12 +621,12 @@ class ChoiceWidget(Widget):
'attrs': option_attrs,
'type': self.input_type,
'template_name': self.option_template_name,
+ 'wrap_label': True,
}
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
context['widget']['optgroups'] = self.optgroups(name, context['widget']['value'], attrs)
- context['wrap_label'] = True
return context
def id_for_label(self, id_, index='0'):