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(),
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
+{% block mediagoblin_head %}
+ <script>
+ $(document).ready(function(){
+ $("#password").after('<input type="text" value="" name="password_clear" id="password_clear" /><input type="checkbox" id="password_boolean" />Show password');
+ $('#password_clear').hide();
+ $('#password_boolean').click(function(){
+ if($('#password_boolean').prop("checked")) {
+ $('#password_clear').val($('#password').val());
+ $('#password').hide();
+ $('#password_clear').show();
+ } else {
+ $('#password').val($('#password_clear').val());
+ $('#password_clear').hide();
+ $('#password').show();
+ };
+ });
+ });
+ </script>
+{% endblock mediagoblin_head %}
+
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.auth.register') }}"
href="{{ request.staticdirect('/css/video-js.css') }}"/>
<link rel="shortcut icon"
href="{{ request.staticdirect('/images/goblin.ico') }}" />
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/extlib/jquery.js') }}"></script>
{% block mediagoblin_head %}
{% endblock mediagoblin_head %}
</head>
-
<body>
{% block mediagoblin_body %}
<div class="mediagoblin_body">