44b47b45fdacfb723e0848222c44e3877d5cd9c2
[django-cas-provider.git] / cas_provider / forms.py
1 from django import forms
2
3
4 class LoginForm(forms.Form):
5     username = forms.CharField(widget=forms.TextInput(attrs={'autofocus': 'autofocus',
6                                                           'max_length': '255'}))
7     password = forms.CharField(widget=forms.PasswordInput())
8     service = forms.CharField(widget=forms.HiddenInput, required=False)
9
10     def __init__(self, *args, **kwargs):
11         # renew = kwargs.pop('renew', None)
12         # gateway = kwargs.pop('gateway', None)
13         request = kwargs.pop('request', None)
14         super(LoginForm, self).__init__(*args, **kwargs)
15         self.request = request
16
17
18 class MergeLoginForm(LoginForm):
19     username = forms.CharField(max_length=255, widget=forms.HiddenInput)