This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/password_expiry_policy/forms.py
2019-03-03 17:12:05 +01:00

25 lines
716 B
Python

"""passbook PasswordExpiry Policy forms"""
from django import forms
from django.utils.translation import gettext as _
from passbook.core.forms.policies import GENERAL_FIELDS
from passbook.password_expiry_policy.models import PasswordExpiryPolicy
class PasswordExpiryPolicyForm(forms.ModelForm):
"""Edit PasswordExpiryPolicy instances"""
class Meta:
model = PasswordExpiryPolicy
fields = GENERAL_FIELDS + ['days', 'deny_only']
widgets = {
'name': forms.TextInput(),
'order': forms.NumberInput(),
'days': forms.NumberInput(),
}
labels = {
'deny_only': _("Only fail the policy, don't set user's password.")
}