1 from __future__ import unicode_literals
3 from django import forms
4 from django.utils.translation import ugettext_lazy as _
7 class LoginForm(forms.Form):
8 username = forms.CharField(widget=forms.TextInput(attrs={'autofocus': 'autofocus',
11 password = forms.CharField(widget=forms.PasswordInput(), label=_('Password'))
12 service = forms.CharField(widget=forms.HiddenInput, required=False)
14 def __init__(self, *args, **kwargs):
15 # renew = kwargs.pop('renew', None)
16 # gateway = kwargs.pop('gateway', None)
17 request = kwargs.pop('request', None)
18 super(LoginForm, self).__init__(*args, **kwargs)
19 self.request = request
22 class MergeLoginForm(LoginForm):
23 username = forms.CharField(max_length=255, widget=forms.HiddenInput,