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-10-07 14:33:48 +00:00
|
|
|
"""passbook administration forms"""
|
|
|
|
from django import forms
|
|
|
|
from django.contrib.admin.widgets import FilteredSelectMultiple
|
|
|
|
from django.utils.translation import gettext as _
|
|
|
|
|
|
|
|
from passbook.factors.dummy.models import DummyFactor
|
|
|
|
from passbook.factors.forms import GENERAL_FIELDS
|
|
|
|
|
|
|
|
|
|
|
|
class DummyFactorForm(forms.ModelForm):
|
|
|
|
"""Form to create/edit Dummy Factor"""
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
|
|
|
model = DummyFactor
|
|
|
|
fields = GENERAL_FIELDS
|
|
|
|
widgets = {
|
2019-12-31 11:51:16 +00:00
|
|
|
"name": forms.TextInput(),
|
|
|
|
"order": forms.NumberInput(),
|
|
|
|
"policies": FilteredSelectMultiple(_("policies"), False),
|
2019-10-07 14:33:48 +00:00
|
|
|
}
|