Add show-password checkbox and make it work

This commit is contained in:
Jef van Schendel
2011-12-02 23:48:40 +01:00
parent 92417fc535
commit 0d6e5dddeb
3 changed files with 23 additions and 10 deletions

View File

@@ -29,15 +29,7 @@ class RegistrationForm(wtforms.Form):
password = wtforms.PasswordField(
_('Password'),
[wtforms.validators.Required(),
wtforms.validators.Length(min=6, max=30),
wtforms.validators.EqualTo(
'confirm_password',
_('Passwords must match.'))])
confirm_password = wtforms.PasswordField(
_('Confirm password'),
[wtforms.validators.Required()],
description=_(
u"Type it again here to make sure there are no spelling mistakes."))
wtforms.validators.Length(min=6, max=30)])
email = wtforms.TextField(
_('Email address'),
[wtforms.validators.Required(),