Skip to content

Commit

Permalink
Merge pull request #5054 from ferrl/update-autocomplete
Browse files Browse the repository at this point in the history
Update password confirmation autocomplete
  • Loading branch information
Lucas Ferreira authored Apr 3, 2019
2 parents 2e5b5fc + 964ae53 commit c1e4031
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
### Unreleased

* enhancements
* Add `autocomplete="new-password"` to `password_confirmation` fields (by @ferrl)

### 4.6.2 - 2019-03-26

* bug fixes
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<div class="field">
<%= f.label :password_confirmation, "Confirm new password" %><br />
<%= f.password_field :password_confirmation, autocomplete: "off" %>
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
</div>

<div class="actions">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
autofocus: true,
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
input_html: { autocomplete: "new-password" } %>
<%= f.input :password_confirmation, label: "Confirm your new password", required: true %>
<%= f.input :password_confirmation,
label: "Confirm your new password",
required: true,
input_html: { autocomplete: "new-password" } %>
</div>

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

0 comments on commit c1e4031

Please sign in to comment.