Bases: Select2MultipleWidget
Source code in hypha/apply/funds/widgets.py
| def __init__(self, *args, **kwargs):
attrs = kwargs.get("attrs", {})
attrs.setdefault("data-placeholder", "items")
kwargs["attrs"] = attrs
super().__init__(*args, **kwargs)
|
js = (static('js/select2.multi-checkboxes.js'), static('js/django_select2-checkboxes.js'))
build_attrs(*args, **kwargs)
Source code in hypha/apply/funds/widgets.py
| def build_attrs(self, *args, **kwargs):
attrs = super().build_attrs(*args, **kwargs)
attrs["class"] = attrs["class"].replace(
"django-select2", "django-select2-checkboxes"
)
return attrs
|