From 39aa1db4d69eb2fb49da463f973484b501b3ee52 Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Mon, 20 May 2013 14:04:02 -0700 Subject: moved change pass to a seperate view and fixed issues 709 --- mediagoblin/edit/forms.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'mediagoblin/edit/forms.py') diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py index ef270237..c67180e9 100644 --- a/mediagoblin/edit/forms.py +++ b/mediagoblin/edit/forms.py @@ -59,17 +59,6 @@ class EditProfileForm(wtforms.Form): class EditAccountForm(wtforms.Form): - old_password = wtforms.PasswordField( - _('Old password'), - description=_( - "Enter your old password to prove you own this account.")) - new_password = wtforms.PasswordField( - _('New password'), - [ - wtforms.validators.Optional(), - wtforms.validators.Length(min=6, max=30) - ], - id="password") license_preference = wtforms.SelectField( _('License preference'), [ @@ -103,3 +92,15 @@ class EditCollectionForm(wtforms.Form): description=_( "The title part of this collection's address. " "You usually don't need to change this.")) + + +class ChangePassForm(wtforms.Form): + old_password = wtforms.PasswordField( + _('Old password'), + [wtforms.validators.Required()], + description=_( + "Enter your old password to prove you own this account.")) + new_password = wtforms.PasswordField( + _('New password'), + [wtforms.validators.Required(), + wtforms.validators.Length(min=6, max=30)]) -- cgit v1.2.3 From 2ba7603469a80ccfc1c07ddebc53ad6c6f0a6f79 Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Tue, 21 May 2013 08:51:21 -0700 Subject: fixed translation, and changed tabs to spaces, and change it so the user can view their password as they're typing. --- mediagoblin/edit/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mediagoblin/edit/forms.py') diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py index c67180e9..3b2486de 100644 --- a/mediagoblin/edit/forms.py +++ b/mediagoblin/edit/forms.py @@ -103,4 +103,5 @@ class ChangePassForm(wtforms.Form): new_password = wtforms.PasswordField( _('New password'), [wtforms.validators.Required(), - wtforms.validators.Length(min=6, max=30)]) + wtforms.validators.Length(min=6, max=30)], + id="password") -- cgit v1.2.3