Skip to content
Snippets Groups Projects
Commit 3a52d935 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Revert child groups form changes

parent 34598ddd
No related branches found
No related tags found
1 merge request!362Resolve "Use Select2 everywhere"
Pipeline #4096 failed
......@@ -300,13 +300,7 @@ class AnnouncementForm(ExtensibleForm):
class ChildGroupsForm(forms.Form):
"""Inline form for group editing to select child groups."""
child_groups = forms.ModelMultipleChoiceField(
queryset=Group.objects.all(),
widget=ModelSelect2MultipleWidget(
search_fields=["name__icontains", "short_name__icontains",],
attrs={"data-minimum-input-length": 0, "class": "browser-default"},
),
)
child_groups = forms.ModelMultipleChoiceField(queryset=Group.objects.all())
class SitePreferenceForm(PreferenceForm):
......
......@@ -2,14 +2,7 @@
{% extends "core/base.html" %}
{% load i18n material_form any_js %}
{% block extra_head %}
{{ form.media.css }}
{% include_css "select2-materialize" %}
{% endblock %}
{% load i18n material_form %}
{% block browser_title %}{% blocktrans %}Assign child groups to groups{% endblocktrans %}{% endblock %}
{% block page_title %}
......@@ -126,7 +119,7 @@
{% csrf_token %}
{% form form=form %}{% endform %}
{% include "components/chips.html" with form_field=form.child_groups %}
<p class="left">
{% if page.has_previous %}
......@@ -158,6 +151,4 @@
</p>
</form>
{% endif %}
{% include_js "select2-materialize" %}
{{ form.media.js }}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment