diff options
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r-- | mediagoblin/edit/forms.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py index 856852b6..ef270237 100644 --- a/mediagoblin/edit/forms.py +++ b/mediagoblin/edit/forms.py @@ -17,7 +17,7 @@ import wtforms from mediagoblin.tools.text import tag_length_validator, TOO_LONG_TAG_WARNING -from mediagoblin.tools.translate import fake_ugettext_passthrough as _ +from mediagoblin.tools.translate import lazy_pass_to_ugettext as _ from mediagoblin.tools.licenses import licenses_as_choices class EditForm(wtforms.Form): @@ -65,11 +65,21 @@ class EditAccountForm(wtforms.Form): "Enter your old password to prove you own this account.")) new_password = wtforms.PasswordField( _('New password'), - [wtforms.validators.Length(min=6, max=30)], + [ + wtforms.validators.Optional(), + wtforms.validators.Length(min=6, max=30) + ], id="password") + license_preference = wtforms.SelectField( + _('License preference'), + [ + wtforms.validators.Optional(), + wtforms.validators.AnyOf([lic[0] for lic in licenses_as_choices()]), + ], + choices=licenses_as_choices(), + description=_('This will be your default license on upload forms.')) wants_comment_notification = wtforms.BooleanField( - _(''), - description=_("Email me when others comment on my media")) + label=_("Email me when others comment on my media")) class EditAttachmentsForm(wtforms.Form): |