Skip to content

Commit 964ae53

Browse files
author
Lucas Ferreira
committed
Update password confirmation autocomplete
1 parent 2e5b5fc commit 964ae53

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### Unreleased
22

3+
* enhancements
4+
* Add `autocomplete="new-password"` to `password_confirmation` fields (by @ferrl)
5+
36
### 4.6.2 - 2019-03-26
47

58
* bug fixes

app/views/devise/passwords/edit.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<div class="field">
1616
<%= f.label :password_confirmation, "Confirm new password" %><br />
17-
<%= f.password_field :password_confirmation, autocomplete: "off" %>
17+
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
1818
</div>
1919

2020
<div class="actions">

lib/generators/templates/simple_form_for/passwords/edit.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
autofocus: true,
1414
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
1515
input_html: { autocomplete: "new-password" } %>
16-
<%= f.input :password_confirmation, label: "Confirm your new password", required: true %>
16+
<%= f.input :password_confirmation,
17+
label: "Confirm your new password",
18+
required: true,
19+
input_html: { autocomplete: "new-password" } %>
1720
</div>
1821

1922
<div class="form-actions">

0 commit comments

Comments
 (0)