Make show-password-js work for change password too
The show password js depends on the password field to have an id of "password". So give it a proper id. Also fixed the label generation for the case of field.name and field.id being different.
This commit is contained in:
parent
4a24500aa4
commit
49af00e491
@ -64,7 +64,8 @@ class EditAccountForm(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")
|
||||||
|
|
||||||
|
|
||||||
class EditAttachmentsForm(wtforms.Form):
|
class EditAttachmentsForm(wtforms.Form):
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
{# Generically render a field #}
|
{# Generically render a field #}
|
||||||
{% macro render_field_div(field) %}
|
{% macro render_field_div(field) %}
|
||||||
{% if field.label.text -%}
|
{% if field.label.text -%}
|
||||||
<p class="form_field_label"><label for="{{ field.name }}">{{ _(field.label.text) }}</label></p>
|
<p class="form_field_label"><label for="{{ field.label.field_id }}">{{ _(field.label.text) }}</label></p>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<div class="form_field_input">
|
<div class="form_field_input">
|
||||||
{{ field }}
|
{{ field }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user