diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-09-19 16:04:23 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-09-19 16:04:23 -0500 |
commit | 74ae6fb0b620c2f899e2c97ba5f6af105103df6f (patch) | |
tree | 1fc5a7634299ba221858536a12d3fa8066a1898f /mediagoblin/plugins/basic_auth/forms.py | |
parent | 3dc6184167691d390f016c2b73fd6a9887955102 (diff) | |
parent | f9931418d65c7823e13bc45f647a682ddf3b8632 (diff) | |
download | mediagoblin-74ae6fb0b620c2f899e2c97ba5f6af105103df6f.tar.lz mediagoblin-74ae6fb0b620c2f899e2c97ba5f6af105103df6f.tar.xz mediagoblin-74ae6fb0b620c2f899e2c97ba5f6af105103df6f.zip |
Merge remote-tracking branch 'refs/remotes/rodney757/auth_refactor'
Conflicts:
mediagoblin/auth/views.py
mediagoblin/edit/forms.py
mediagoblin/templates/mediagoblin/edit/edit_account.html
Diffstat (limited to 'mediagoblin/plugins/basic_auth/forms.py')
-rw-r--r-- | mediagoblin/plugins/basic_auth/forms.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mediagoblin/plugins/basic_auth/forms.py b/mediagoblin/plugins/basic_auth/forms.py index 6cf01b38..c10496f8 100644 --- a/mediagoblin/plugins/basic_auth/forms.py +++ b/mediagoblin/plugins/basic_auth/forms.py @@ -44,3 +44,33 @@ class LoginForm(wtforms.Form): stay_logged_in = wtforms.BooleanField( label='', description=_('Stay logged in')) + + +class ForgotPassForm(wtforms.Form): + username = wtforms.TextField( + _('Username or email'), + [wtforms.validators.Required(), + normalize_user_or_email_field()]) + + +class ChangeForgotPassForm(wtforms.Form): + password = wtforms.PasswordField( + 'Password', + [wtforms.validators.Required(), + wtforms.validators.Length(min=5, max=1024)]) + token = wtforms.HiddenField( + '', + [wtforms.validators.Required()]) + + +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)], + id="password") |