stages/identification: minor UI fixes
This commit is contained in:
parent
b0f426e51a
commit
0c5aff21bc
|
@ -1,5 +1,6 @@
|
|||
"""passbook flows identification forms"""
|
||||
from django import forms
|
||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
||||
from django.core.validators import validate_email
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from structlog import get_logger
|
||||
|
@ -19,6 +20,9 @@ class IdentificationStageForm(forms.ModelForm):
|
|||
fields = ["name", "user_fields", "template", "enrollment_flow", "recovery_flow"]
|
||||
widgets = {
|
||||
"name": forms.TextInput(),
|
||||
"user_fields": FilteredSelectMultiple(
|
||||
_("fields"), False, choices=UserFields.choices
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class IdentificationStage(Stage):
|
|||
related_name="+",
|
||||
default=None,
|
||||
help_text=_(
|
||||
"Optional enrollment flow, which is linked at the bottom of the page."
|
||||
"Optional recovery flow, which is linked at the bottom of the page."
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
"""passbook administration forms"""
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from passbook.lib.utils.reflection import path_to_class
|
||||
from passbook.stages.password.models import PasswordStage
|
||||
|
||||
|
||||
def get_authentication_backends():
|
||||
"""Return all available authentication backends as tuple set"""
|
||||
for backend in settings.AUTHENTICATION_BACKENDS:
|
||||
klass = path_to_class(backend)
|
||||
yield backend, getattr(
|
||||
klass(), "name", "%s (%s)" % (klass.__name__, klass.__module__)
|
||||
)
|
||||
return [
|
||||
(
|
||||
"django.contrib.auth.backends.ModelBackend",
|
||||
_("passbook-internal Userdatabase"),
|
||||
),
|
||||
(
|
||||
"passbook.sources.ldap.auth.LDAPBackend",
|
||||
_("passbook LDAP (Only needed when User-Sync is not enabled."),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
class PasswordForm(forms.Form):
|
||||
|
|
|
@ -5927,7 +5927,7 @@ definitions:
|
|||
x-nullable: true
|
||||
recovery_flow:
|
||||
title: Recovery flow
|
||||
description: Optional enrollment flow, which is linked at the bottom of the
|
||||
description: Optional recovery flow, which is linked at the bottom of the
|
||||
page.
|
||||
type: string
|
||||
format: uuid
|
||||
|
|
Reference in New Issue