summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-04-15 13:55:33 -0400
committerTim Graham <timograham@gmail.com>2017-04-20 11:07:54 -0400
commit2f358d32ec4197d3fd7c246272ed2719d674c8d7 (patch)
tree242aa69ac5bc081df06de841beff227f69587478 /django/forms
parente6bfd3d751278d7cfd09af1120c4bbce509c05da (diff)
[1.11.x] Fixed #28059 -- Restored class attribute in <ul> of widgets that use multiple_input.html.
Regression in b52c73008a9d67e9ddbb841872dc15cdd3d6ee01 Backport of af1f986360dc6bb6e75e960dbc191707541128ac from master
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/jinja2/django/forms/widgets/multiple_input.html2
-rw-r--r--django/forms/templates/django/forms/widgets/multiple_input.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/jinja2/django/forms/widgets/multiple_input.html b/django/forms/jinja2/django/forms/widgets/multiple_input.html
index 349db54104..21cd9b665d 100644
--- a/django/forms/jinja2/django/forms/widgets/multiple_input.html
+++ b/django/forms/jinja2/django/forms/widgets/multiple_input.html
@@ -1,4 +1,4 @@
-{% set id = widget.attrs.id %}<ul{% if id %} id="{{ id }}"{% endif %}>{% for group, options, index in widget.optgroups %}{% if group %}
+{% set id = widget.attrs.id %}<ul{% if id %} id="{{ id }}"{% endif %}{% if widget.attrs.class %} class="{{ widget.attrs.class }}"{% endif %}>{% for group, options, index in widget.optgroups %}{% if group %}
<li>{{ group }}<ul{% if id %} id="{{ id }}_{{ index }}"{% endif %}>{% endif %}{% for widget in options %}
<li>{% include widget.template_name %}</li>{% endfor %}{% if group %}
</ul></li>{% endif %}{% endfor %}
diff --git a/django/forms/templates/django/forms/widgets/multiple_input.html b/django/forms/templates/django/forms/widgets/multiple_input.html
index 2362aff4e6..0ba9942874 100644
--- a/django/forms/templates/django/forms/widgets/multiple_input.html
+++ b/django/forms/templates/django/forms/widgets/multiple_input.html
@@ -1,4 +1,4 @@
-{% with id=widget.attrs.id %}<ul{% if id %} id="{{ id }}"{% endif %}>{% for group, options, index in widget.optgroups %}{% if group %}
+{% with id=widget.attrs.id %}<ul{% if id %} id="{{ id }}"{% endif %}{% if widget.attrs.class %} class="{{ widget.attrs.class }}"{% endif %}>{% for group, options, index in widget.optgroups %}{% if group %}
<li>{{ group }}<ul{% if id %} id="{{ id }}_{{ index }}"{% endif %}>{% endif %}{% for option in options %}
<li>{% include option.template_name with widget=option %}</li>{% endfor %}{% if group %}
</ul></li>{% endif %}{% endfor %}