*: remove use of FilteredSelectMultiple
This commit is contained in:
parent
0c2d46e0af
commit
82dd597881
|
@ -1,8 +1,5 @@
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% load passbook_is_active %}
|
|
||||||
{% load passbook_utils %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"""passbook Core Group forms"""
|
"""passbook Core Group forms"""
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
||||||
|
|
||||||
from passbook.admin.fields import CodeMirrorWidget, YAMLField
|
from passbook.admin.fields import CodeMirrorWidget, YAMLField
|
||||||
from passbook.core.models import Group, User
|
from passbook.core.models import Group, User
|
||||||
|
@ -12,7 +11,6 @@ class GroupForm(forms.ModelForm):
|
||||||
members = forms.ModelMultipleChoiceField(
|
members = forms.ModelMultipleChoiceField(
|
||||||
User.objects.all(),
|
User.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
widget=FilteredSelectMultiple("users", False),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""passbook PasswordExpiry Policy forms"""
|
"""passbook PasswordExpiry Policy forms"""
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from passbook.policies.expiry.models import PasswordExpiryPolicy
|
from passbook.policies.expiry.models import PasswordExpiryPolicy
|
||||||
|
@ -19,6 +18,5 @@ class PasswordExpiryPolicyForm(forms.ModelForm):
|
||||||
"name": forms.TextInput(),
|
"name": forms.TextInput(),
|
||||||
"order": forms.NumberInput(),
|
"order": forms.NumberInput(),
|
||||||
"days": forms.NumberInput(),
|
"days": forms.NumberInput(),
|
||||||
"policies": FilteredSelectMultiple(_("policies"), False),
|
|
||||||
}
|
}
|
||||||
labels = {"deny_only": _("Only fail the policy, don't set user's password.")}
|
labels = {"deny_only": _("Only fail the policy, don't set user's password.")}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""passbook HaveIBeenPwned Policy forms"""
|
"""passbook HaveIBeenPwned Policy forms"""
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from passbook.policies.forms import GENERAL_FIELDS
|
from passbook.policies.forms import GENERAL_FIELDS
|
||||||
|
@ -18,5 +17,4 @@ class HaveIBeenPwnedPolicyForm(forms.ModelForm):
|
||||||
widgets = {
|
widgets = {
|
||||||
"name": forms.TextInput(),
|
"name": forms.TextInput(),
|
||||||
"password_field": forms.TextInput(),
|
"password_field": forms.TextInput(),
|
||||||
"policies": FilteredSelectMultiple(_("policies"), False),
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""passbook SAML IDP Forms"""
|
"""passbook SAML IDP Forms"""
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
||||||
from django.utils.html import mark_safe
|
from django.utils.html import mark_safe
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
|
@ -51,7 +50,6 @@ class SAMLProviderForm(forms.ModelForm):
|
||||||
"assertion_valid_not_before": forms.TextInput(),
|
"assertion_valid_not_before": forms.TextInput(),
|
||||||
"assertion_valid_not_on_or_after": forms.TextInput(),
|
"assertion_valid_not_on_or_after": forms.TextInput(),
|
||||||
"session_valid_not_on_or_after": forms.TextInput(),
|
"session_valid_not_on_or_after": forms.TextInput(),
|
||||||
"property_mappings": FilteredSelectMultiple(_("Property Mappings"), False),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""passbook LDAP Forms"""
|
"""passbook LDAP Forms"""
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from passbook.admin.fields import CodeMirrorWidget
|
from passbook.admin.fields import CodeMirrorWidget
|
||||||
|
@ -54,7 +53,6 @@ class LDAPSourceForm(forms.ModelForm):
|
||||||
"group_object_filter": forms.TextInput(),
|
"group_object_filter": forms.TextInput(),
|
||||||
"user_group_membership_field": forms.TextInput(),
|
"user_group_membership_field": forms.TextInput(),
|
||||||
"object_uniqueness_field": forms.TextInput(),
|
"object_uniqueness_field": forms.TextInput(),
|
||||||
"property_mappings": FilteredSelectMultiple(_("Property Mappings"), False),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"""passbook administration forms"""
|
"""passbook administration forms"""
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from passbook.flows.models import Flow, FlowDesignation
|
from passbook.flows.models import Flow, FlowDesignation
|
||||||
|
@ -54,7 +53,7 @@ class PasswordStageForm(forms.ModelForm):
|
||||||
fields = ["name", "backends", "configure_flow", "failed_attempts_before_cancel"]
|
fields = ["name", "backends", "configure_flow", "failed_attempts_before_cancel"]
|
||||||
widgets = {
|
widgets = {
|
||||||
"name": forms.TextInput(),
|
"name": forms.TextInput(),
|
||||||
"backends": FilteredSelectMultiple(
|
"backends": forms.SelectMultiple(
|
||||||
_("backends"), False, choices=get_authentication_backends()
|
get_authentication_backends()
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ from types import MethodType
|
||||||
from typing import Any, Callable, Iterator, List
|
from typing import Any, Callable, Iterator, List
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
from django.http import HttpRequest
|
from django.http import HttpRequest
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
@ -27,7 +26,6 @@ class PromptStageForm(forms.ModelForm):
|
||||||
fields = ["name", "fields", "validation_policies"]
|
fields = ["name", "fields", "validation_policies"]
|
||||||
widgets = {
|
widgets = {
|
||||||
"name": forms.TextInput(),
|
"name": forms.TextInput(),
|
||||||
"fields": FilteredSelectMultiple(_("prompts"), False),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue