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/policies/dummy/forms.py

21 lines
513 B
Python
Raw Normal View History

2019-02-16 09:24:31 +00:00
"""passbook Policy forms"""
2018-11-26 21:08:48 +00:00
from django import forms
from django.utils.translation import gettext as _
2018-11-26 21:08:48 +00:00
from passbook.policies.dummy.models import DummyPolicy
2019-10-07 14:33:48 +00:00
from passbook.policies.forms import GENERAL_FIELDS
class DummyPolicyForm(forms.ModelForm):
"""DummyPolicyForm Form"""
class Meta:
model = DummyPolicy
2019-12-31 11:51:16 +00:00
fields = GENERAL_FIELDS + ["result", "wait_min", "wait_max"]
widgets = {
2019-12-31 11:51:16 +00:00
"name": forms.TextInput(),
}
2019-12-31 11:51:16 +00:00
labels = {"result": _("Allow user")}