forked from OTA-Insight/djangosaml2idp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathforms.py
21 lines (16 loc) · 818 Bytes
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from django import forms
from django.contrib.auth.forms import AuthenticationForm
from django.utils.translation import gettext as _
class LoginForm(AuthenticationForm):
# these are inherited
# username = forms.CharField()
# password = forms.CharField(widget=forms.PasswordInput())
forget_agreement = forms.BooleanField(label=_("Forget my last agreement"),
required=False)
class AgreementForm(forms.Form):
CHOICES = ((1, _('I Agree')),
(0, _('I do not Agree')))
confirm = forms.ChoiceField(choices=CHOICES, widget=forms.RadioSelect)
dont_show_again = forms.BooleanField(label=_("Remember my choice "
"for the next login"),
required=False)