1 from django import forms
2 from django.utils.translation import ugettext_lazy as _
5 class LoginForm(forms.Form):
6 username = forms.CharField(widget=forms.TextInput(attrs={'autofocus': 'autofocus',
9 password = forms.CharField(widget=forms.PasswordInput(), label=_('Password'))
10 service = forms.CharField(widget=forms.HiddenInput, required=False)
12 def __init__(self, *args, **kwargs):
13 # renew = kwargs.pop('renew', None)
14 # gateway = kwargs.pop('gateway', None)
15 request = kwargs.pop('request', None)
16 super(LoginForm, self).__init__(*args, **kwargs)
17 self.request = request
20 class MergeLoginForm(LoginForm):
21 username = forms.CharField(max_length=255, widget=forms.HiddenInput,