aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r--mediagoblin/edit/forms.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 5de1bf96..3f1e2386 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -61,10 +61,6 @@ class EditProfileForm(wtforms.Form):
class EditAccountForm(wtforms.Form):
- new_email = wtforms.TextField(
- _('New email address'),
- [wtforms.validators.Optional(),
- normalize_user_or_email_field(allow_user=False)])
wants_comment_notification = wtforms.BooleanField(
description=_("Email me when others comment on my media"))
wants_notifications = wtforms.BooleanField(
@@ -113,3 +109,15 @@ class ChangePassForm(wtforms.Form):
[wtforms.validators.Required(),
wtforms.validators.Length(min=6, max=30)],
id="password")
+
+
+class ChangeEmailForm(wtforms.Form):
+ new_email = wtforms.TextField(
+ _('New email address'),
+ [wtforms.validators.Required(),
+ normalize_user_or_email_field(allow_user=False)])
+ password = wtforms.PasswordField(
+ _('Password'),
+ [wtforms.validators.Required()],
+ description=_(
+ "Enter your password to prove you own this account."))