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.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index f81d58b2..93934be7 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -14,12 +14,10 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
import wtforms
-from mediagoblin.util import tag_length_validator, TOO_LONG_TAG_WARNING
-from mediagoblin.util import fake_ugettext_passthrough as _
-
+from mediagoblin.tools.text import tag_length_validator, TOO_LONG_TAG_WARNING
+from mediagoblin.tools.translate import fake_ugettext_passthrough as _
class EditForm(wtforms.Form):
title = wtforms.TextField(
@@ -28,7 +26,9 @@ class EditForm(wtforms.Form):
description = wtforms.TextAreaField('Description of this work')
tags = wtforms.TextField(
_('Tags'),
- [tag_length_validator])
+ [tag_length_validator],
+ description=_(
+ "Seperate tags by commas or spaces."))
slug = wtforms.TextField(
_('Slug'),
[wtforms.validators.Required(message=_("The slug can't be empty"))],
@@ -45,6 +45,19 @@ class EditProfileForm(wtforms.Form):
_('Website'),
[wtforms.validators.Optional(),
wtforms.validators.URL(message='Improperly formed URL')])
+ old_password = wtforms.PasswordField(
+ _('Old password'),
+ [wtforms.validators.Optional()])
+ new_password = wtforms.PasswordField(
+ _('New Password'),
+ [wtforms.validators.Optional(),
+ wtforms.validators.Length(min=6, max=30),
+ wtforms.validators.EqualTo(
+ 'confirm_password',
+ 'Passwords must match.')])
+ confirm_password = wtforms.PasswordField(
+ 'Confirm password',
+ [wtforms.validators.Optional()])
class EditAttachmentsForm(wtforms.Form):