Skip to content

Commit

Permalink
[wcag] Correctly match up labels with password inputs
Browse files Browse the repository at this point in the history
Repeat ids! Argh! By removing the ids the macro that creates the input uses
the name parameter and then we get what we're after.
  • Loading branch information
jrdh committed Sep 10, 2020
1 parent a89b60f commit 3d57fe2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ckan/templates/user/edit_user_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@
{{ form.input('old_password',
type='password',
label=_('Sysadmin Password') if is_sysadmin else _('Old Password'),
id='field-password',
value=data.oldpassword,
error=errors.oldpassword,
classes=['control-medium'],
attrs={'autocomplete': 'off', 'class': 'form-control'}
) }}

{{ form.input('password1', type='password', label=_('Password'), id='field-password', value=data.password1, error=errors.password1, classes=['control-medium'], attrs={'autocomplete': 'off', 'class': 'form-control'} ) }}
{{ form.input('password1', type='password', label=_('Password'), value=data.password1, error=errors.password1, classes=['control-medium'], attrs={'autocomplete': 'off', 'class': 'form-control'} ) }}

{{ form.input('password2', type='password', label=_('Confirm Password'), id='field-password-confirm', value=data.password2, error=errors.password2, classes=['control-medium'], attrs={'autocomplete': 'off', 'class': 'form-control'}) }}
{{ form.input('password2', type='password', label=_('Confirm Password'), value=data.password2, error=errors.password2, classes=['control-medium'], attrs={'autocomplete': 'off', 'class': 'form-control'}) }}
</fieldset>

<div class="form-actions">
Expand Down

0 comments on commit 3d57fe2

Please sign in to comment.