aboutsummaryrefslogtreecommitdiff
path: root/src/web/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/forms.py')
-rw-r--r--src/web/forms.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/web/forms.py b/src/web/forms.py
index 96953240..5e53946e 100644
--- a/src/web/forms.py
+++ b/src/web/forms.py
@@ -218,25 +218,3 @@ class InformationMessageForm(Form):
message = TextAreaField(lazy_gettext("Message"),
[validators.Required(lazy_gettext("Please enter a content."))])
submit = SubmitField(lazy_gettext("Send"))
-
-
-class RecoverPasswordForm(Form):
- email = EmailField(lazy_gettext("Email"),
- [validators.Length(min=6, max=35),
- validators.Required(
- lazy_gettext("Please enter your email address."))])
- submit = SubmitField(lazy_gettext("Recover"))
-
- def validate(self):
- if not super(RecoverPasswordForm, self).validate():
- return False
-
- user = User.query.filter(User.email == self.email.data).first()
- if user and user.enabled:
- return True
- elif user and not user.enabled:
- flash(lazy_gettext('Account not confirmed.'), 'danger')
- return False
- else:
- flash(lazy_gettext('Invalid email.'), 'danger')
- return False
bgstack15