-class LoginForm(forms.Form):
- username = forms.CharField(max_length=30, label=_('username'))
- password = forms.CharField(widget=forms.PasswordInput, label=_('password'))
- #warn = forms.BooleanField(required=False) # TODO: Implement
- lt = forms.CharField(widget=forms.HiddenInput, initial=create_login_ticket)
- def __init__(self, service=None, renew=None, gateway=None, request=None, *args, **kwargs):
- super(LoginForm, self).__init__(*args, **kwargs)
- self.request = request
- if service is not None:
- self.fields['service'] = forms.CharField(widget=forms.HiddenInput, initial=service)
\ No newline at end of file
+ def get_errors(self):
+ errors = []
+ for k, error in self.errors.items():
+ errors += [e for e in error]
+ return errors