aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/forms.py
diff options
context:
space:
mode:
authorBrandon Invergo <brandon@invergo.net>2013-05-19 13:23:17 +0200
committerBrandon Invergo <brandon@invergo.net>2013-05-19 13:23:17 +0200
commite02b7b6b3bd6b20c65aeb2ca5fd1e0030b631b88 (patch)
tree988b9505a649f824f2ea53ac04bdfbc3a0da983a /mediagoblin/edit/forms.py
parent60c42337ef7bc9b4aec0d3f1b2cb5f19a09d9a7f (diff)
parent041d2fd785f9b3e18f9fd758f91dbfa7715d317c (diff)
downloadmediagoblin-e02b7b6b3bd6b20c65aeb2ca5fd1e0030b631b88.tar.lz
mediagoblin-e02b7b6b3bd6b20c65aeb2ca5fd1e0030b631b88.tar.xz
mediagoblin-e02b7b6b3bd6b20c65aeb2ca5fd1e0030b631b88.zip
Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r--mediagoblin/edit/forms.py18
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):