From 82dd5978811d7005a58c7de016c33f75b8916585 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 22 Nov 2020 21:11:52 +0100 Subject: [PATCH] *: remove use of FilteredSelectMultiple --- passbook/admin/templates/administration/base.html | 3 --- passbook/core/forms/groups.py | 2 -- passbook/policies/expiry/forms.py | 2 -- passbook/policies/hibp/forms.py | 2 -- passbook/providers/saml/forms.py | 2 -- passbook/sources/ldap/forms.py | 2 -- passbook/stages/password/forms.py | 5 ++--- passbook/stages/prompt/forms.py | 2 -- 8 files changed, 2 insertions(+), 18 deletions(-) diff --git a/passbook/admin/templates/administration/base.html b/passbook/admin/templates/administration/base.html index 6d2b1163c..ee466a3fc 100644 --- a/passbook/admin/templates/administration/base.html +++ b/passbook/admin/templates/administration/base.html @@ -1,8 +1,5 @@ {% load static %} {% load i18n %} -{% load passbook_is_active %} -{% load passbook_utils %} - {% block content %} {% endblock %} diff --git a/passbook/core/forms/groups.py b/passbook/core/forms/groups.py index ffb85dab2..e33805d0d 100644 --- a/passbook/core/forms/groups.py +++ b/passbook/core/forms/groups.py @@ -1,6 +1,5 @@ """passbook Core Group forms""" from django import forms -from django.contrib.admin.widgets import FilteredSelectMultiple from passbook.admin.fields import CodeMirrorWidget, YAMLField from passbook.core.models import Group, User @@ -12,7 +11,6 @@ class GroupForm(forms.ModelForm): members = forms.ModelMultipleChoiceField( User.objects.all(), required=False, - widget=FilteredSelectMultiple("users", False), ) def __init__(self, *args, **kwargs): diff --git a/passbook/policies/expiry/forms.py b/passbook/policies/expiry/forms.py index e84794ac1..2eb85220c 100644 --- a/passbook/policies/expiry/forms.py +++ b/passbook/policies/expiry/forms.py @@ -1,7 +1,6 @@ """passbook PasswordExpiry Policy forms""" from django import forms -from django.contrib.admin.widgets import FilteredSelectMultiple from django.utils.translation import gettext as _ from passbook.policies.expiry.models import PasswordExpiryPolicy @@ -19,6 +18,5 @@ class PasswordExpiryPolicyForm(forms.ModelForm): "name": forms.TextInput(), "order": forms.NumberInput(), "days": forms.NumberInput(), - "policies": FilteredSelectMultiple(_("policies"), False), } labels = {"deny_only": _("Only fail the policy, don't set user's password.")} diff --git a/passbook/policies/hibp/forms.py b/passbook/policies/hibp/forms.py index f8f39df0e..39bf3254d 100644 --- a/passbook/policies/hibp/forms.py +++ b/passbook/policies/hibp/forms.py @@ -1,7 +1,6 @@ """passbook HaveIBeenPwned Policy forms""" from django import forms -from django.contrib.admin.widgets import FilteredSelectMultiple from django.utils.translation import gettext as _ from passbook.policies.forms import GENERAL_FIELDS @@ -18,5 +17,4 @@ class HaveIBeenPwnedPolicyForm(forms.ModelForm): widgets = { "name": forms.TextInput(), "password_field": forms.TextInput(), - "policies": FilteredSelectMultiple(_("policies"), False), } diff --git a/passbook/providers/saml/forms.py b/passbook/providers/saml/forms.py index b64ae3e5f..abfa3bde6 100644 --- a/passbook/providers/saml/forms.py +++ b/passbook/providers/saml/forms.py @@ -1,7 +1,6 @@ """passbook SAML IDP Forms""" from django import forms -from django.contrib.admin.widgets import FilteredSelectMultiple from django.utils.html import mark_safe from django.utils.translation import gettext as _ @@ -51,7 +50,6 @@ class SAMLProviderForm(forms.ModelForm): "assertion_valid_not_before": forms.TextInput(), "assertion_valid_not_on_or_after": forms.TextInput(), "session_valid_not_on_or_after": forms.TextInput(), - "property_mappings": FilteredSelectMultiple(_("Property Mappings"), False), } diff --git a/passbook/sources/ldap/forms.py b/passbook/sources/ldap/forms.py index 362ed9a9c..3028c5450 100644 --- a/passbook/sources/ldap/forms.py +++ b/passbook/sources/ldap/forms.py @@ -1,7 +1,6 @@ """passbook LDAP Forms""" from django import forms -from django.contrib.admin.widgets import FilteredSelectMultiple from django.utils.translation import gettext_lazy as _ from passbook.admin.fields import CodeMirrorWidget @@ -54,7 +53,6 @@ class LDAPSourceForm(forms.ModelForm): "group_object_filter": forms.TextInput(), "user_group_membership_field": forms.TextInput(), "object_uniqueness_field": forms.TextInput(), - "property_mappings": FilteredSelectMultiple(_("Property Mappings"), False), } diff --git a/passbook/stages/password/forms.py b/passbook/stages/password/forms.py index 99586ef44..71048c55a 100644 --- a/passbook/stages/password/forms.py +++ b/passbook/stages/password/forms.py @@ -1,6 +1,5 @@ """passbook administration forms""" from django import forms -from django.contrib.admin.widgets import FilteredSelectMultiple from django.utils.translation import gettext_lazy as _ from passbook.flows.models import Flow, FlowDesignation @@ -54,7 +53,7 @@ class PasswordStageForm(forms.ModelForm): fields = ["name", "backends", "configure_flow", "failed_attempts_before_cancel"] widgets = { "name": forms.TextInput(), - "backends": FilteredSelectMultiple( - _("backends"), False, choices=get_authentication_backends() + "backends": forms.SelectMultiple( + get_authentication_backends() ), } diff --git a/passbook/stages/prompt/forms.py b/passbook/stages/prompt/forms.py index 598dc3c08..a2bfc3ca9 100644 --- a/passbook/stages/prompt/forms.py +++ b/passbook/stages/prompt/forms.py @@ -4,7 +4,6 @@ from types import MethodType from typing import Any, Callable, Iterator, List from django import forms -from django.contrib.admin.widgets import FilteredSelectMultiple from django.db.models.query import QuerySet from django.http import HttpRequest from django.utils.translation import gettext_lazy as _ @@ -27,7 +26,6 @@ class PromptStageForm(forms.ModelForm): fields = ["name", "fields", "validation_policies"] widgets = { "name": forms.TextInput(), - "fields": FilteredSelectMultiple(_("prompts"), False), }