*: remove use of FilteredSelectMultiple

This commit is contained in:
Jens Langhammer 2020-11-22 21:11:52 +01:00
parent 0c2d46e0af
commit 82dd597881
8 changed files with 2 additions and 18 deletions

View File

@ -1,8 +1,5 @@
{% load static %}
{% load i18n %}
{% load passbook_is_active %}
{% load passbook_utils %}
{% block content %}
{% endblock %}

View File

@ -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):

View File

@ -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.")}

View File

@ -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),
}

View File

@ -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),
}

View File

@ -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),
}

View File

@ -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()
),
}

View File

@ -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),
}