aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/basic_auth/forms.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-07-08 17:00:37 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-16 10:28:47 -0700
commitaeae6cc29099c4bea84bbfd006615104ba719b1e (patch)
tree56a89bf2efa7d47596d95a9644e710d056c4262e /mediagoblin/plugins/basic_auth/forms.py
parentfb900ef27b65b3d220ce16972593869441b4c82c (diff)
downloadmediagoblin-aeae6cc29099c4bea84bbfd006615104ba719b1e.tar.lz
mediagoblin-aeae6cc29099c4bea84bbfd006615104ba719b1e.tar.xz
mediagoblin-aeae6cc29099c4bea84bbfd006615104ba719b1e.zip
moved forgot pass to basic_auth plugin
Diffstat (limited to 'mediagoblin/plugins/basic_auth/forms.py')
-rw-r--r--mediagoblin/plugins/basic_auth/forms.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/mediagoblin/plugins/basic_auth/forms.py b/mediagoblin/plugins/basic_auth/forms.py
index 6cf01b38..e1d38668 100644
--- a/mediagoblin/plugins/basic_auth/forms.py
+++ b/mediagoblin/plugins/basic_auth/forms.py
@@ -44,3 +44,20 @@ 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()])