factors/password(minor): remove form from core

This commit is contained in:
Langhammer, Jens 2019-10-08 14:23:02 +02:00
parent 64290b2a37
commit 171c5b9759
2 changed files with 10 additions and 10 deletions

View File

@ -81,13 +81,3 @@ class SignUpForm(forms.Form):
if password != password_repeat: if password != password_repeat:
raise ValidationError(_("Passwords don't match")) raise ValidationError(_("Passwords don't match"))
return self.cleaned_data.get('password_repeat') return self.cleaned_data.get('password_repeat')
class PasswordFactorForm(forms.Form):
"""Password authentication form"""
password = forms.CharField(widget=forms.PasswordInput(attrs={
'placeholder': _('Password'),
'autofocus': 'autofocus',
'autocomplete': 'current-password'
}))

View File

@ -16,6 +16,16 @@ def get_authentication_backends():
yield backend, getattr(klass(), 'name', '%s (%s)' % (klass.__name__, klass.__module__)) yield backend, getattr(klass(), 'name', '%s (%s)' % (klass.__name__, klass.__module__))
class PasswordForm(forms.Form):
"""Password authentication form"""
password = forms.CharField(widget=forms.PasswordInput(attrs={
'placeholder': _('Password'),
'autofocus': 'autofocus',
'autocomplete': 'current-password'
}))
class PasswordFactorForm(forms.ModelForm): class PasswordFactorForm(forms.ModelForm):
"""Form to create/edit Password Factors""" """Form to create/edit Password Factors"""