fixed translation, and changed tabs to spaces, and change it so the user can view their password as they're typing.

This commit is contained in:
Rodney Ewing 2013-05-21 08:51:21 -07:00
parent eb396abc4a
commit 2ba7603469
3 changed files with 14 additions and 13 deletions

View File

@ -103,4 +103,5 @@ class ChangePassForm(wtforms.Form):
new_password = wtforms.PasswordField( new_password = wtforms.PasswordField(
_('New password'), _('New password'),
[wtforms.validators.Required(), [wtforms.validators.Required(),
wtforms.validators.Length(min=6, max=30)]) wtforms.validators.Length(min=6, max=30)],
id="password")

View File

@ -40,13 +40,13 @@
{%- endtrans -%} {%- endtrans -%}
</h1> </h1>
{{ wtforms_util.render_divs(form) }} {{ wtforms_util.render_divs(form) }}
{{ csrf_token }} {{ csrf_token }}
<div class="form_submit_buttons"> <div class="form_submit_buttons">
<input type="submit" value="{% trans %}Save{% endtrans %}" <input type="submit" value="{% trans %}Save{% endtrans %}"
class="button_form" /> class="button_form" />
</div> </div>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -40,12 +40,12 @@
{%- trans username=user.username -%} {%- trans username=user.username -%}
Changing {{ username }}'s account settings Changing {{ username }}'s account settings
{%- endtrans -%} {%- endtrans -%}
</h1> </h1>
<p>{% trans %}Change your{% endtrans %} <p>
<a href="{{ request.urlgen('mediagoblin.edit.pass') }}"> <a href="{{ request.urlgen('mediagoblin.edit.pass') }}">
{% trans %}password.{% endtrans %} {% trans %}Change your password.{% endtrans %}
</a> </a>
</p> </p>
<div class="form_field_input"> <div class="form_field_input">
<p>{{ form.wants_comment_notification }} <p>{{ form.wants_comment_notification }}
{{ wtforms_util.render_label(form.wants_comment_notification) }}</p> {{ wtforms_util.render_label(form.wants_comment_notification) }}</p>
@ -53,7 +53,7 @@
{{- wtforms_util.render_field_div(form.license_preference) }} {{- wtforms_util.render_field_div(form.license_preference) }}
<div class="form_submit_buttons"> <div class="form_submit_buttons">
<input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button_form" /> <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button_form" />
{{ csrf_token }} {{ csrf_token }}
</div> </div>
</div> </div>
</form> </form>