Fix change password form

This commit is contained in:
Eskil Heyn Olsen
2013-01-12 15:57:52 -08:00
parent 050ccb847a
commit 508f4d1b52
4 changed files with 8 additions and 8 deletions
+4 -3
View File
@@ -200,8 +200,8 @@ class ResetPasswordForm(Form, NewPasswordFormMixin, PasswordConfirmFormMixin):
submit = SubmitField("Reset Password")
class ChangePasswordForm(Form, PasswordFormMixin):
"""The default Change password form"""
class ChangePasswordForm(Form, NextFormMixin, PasswordFormMixin):
"""The default change password form"""
new_password = PasswordField("New Password",
validators=[password_required,
@@ -213,7 +213,8 @@ class ChangePasswordForm(Form, PasswordFormMixin):
submit = SubmitField("Change Password")
def validate(self):
super(ChangePasswordForm, self).validate()
if not super(ChangePasswordForm, self).validate():
return False
if self.password.data.strip() == '':
self.password.errors.append('Password not provided')