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.
2019-02-16 09:24:31 +00:00
|
|
|
"""passbook Policy forms"""
|
2018-11-26 21:08:48 +00:00
|
|
|
|
|
|
|
from django import forms
|
2018-12-14 14:18:02 +00:00
|
|
|
from django.utils.translation import gettext as _
|
2018-11-26 21:08:48 +00:00
|
|
|
|
2019-10-07 14:33:48 +00:00
|
|
|
from passbook.core.models import DebugPolicy
|
|
|
|
from passbook.policies.forms import GENERAL_FIELDS
|
2018-12-09 20:06:21 +00:00
|
|
|
|
|
|
|
|
2019-02-16 09:24:31 +00:00
|
|
|
class DebugPolicyForm(forms.ModelForm):
|
|
|
|
"""DebugPolicyForm Form"""
|
2018-12-09 20:06:21 +00:00
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
2019-02-16 09:24:31 +00:00
|
|
|
model = DebugPolicy
|
2018-12-09 20:06:21 +00:00
|
|
|
fields = GENERAL_FIELDS + ['result', 'wait_min', 'wait_max']
|
|
|
|
widgets = {
|
|
|
|
'name': forms.TextInput(),
|
|
|
|
}
|
2018-12-14 14:18:02 +00:00
|
|
|
labels = {
|
|
|
|
'result': _('Allow user')
|
|
|
|
}
|