diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-21 16:21:33 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-24 18:16:12 -0700 |
commit | 89e1563f683c620387c782c363d63f90abd46a33 (patch) | |
tree | e4fa9fe42084e6dc5a738510b76ac67005fe0940 /mediagoblin/edit/forms.py | |
parent | b75eb88fabdac4a9fdc863969ec9472110732607 (diff) | |
download | mediagoblin-89e1563f683c620387c782c363d63f90abd46a33.tar.lz mediagoblin-89e1563f683c620387c782c363d63f90abd46a33.tar.xz mediagoblin-89e1563f683c620387c782c363d63f90abd46a33.zip |
added support for user to change email address
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r-- | mediagoblin/edit/forms.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py index 3b2486de..3a502263 100644 --- a/mediagoblin/edit/forms.py +++ b/mediagoblin/edit/forms.py @@ -16,9 +16,11 @@ import wtforms -from mediagoblin.tools.text import tag_length_validator, TOO_LONG_TAG_WARNING +from mediagoblin.tools.text import tag_length_validator from mediagoblin.tools.translate import lazy_pass_to_ugettext as _ from mediagoblin.tools.licenses import licenses_as_choices +from mediagoblin.auth.forms import normalize_user_or_email_field + class EditForm(wtforms.Form): title = wtforms.TextField( @@ -59,6 +61,16 @@ 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)]) + password = wtforms.PasswordField( + _('Password'), + [wtforms.validators.Optional(), + wtforms.validators.Length(min=5, max=1024)], + description=_( + 'Enter your old password to prove you own this account.')) license_preference = wtforms.SelectField( _('License preference'), [ |