Skip to content

Commit e686cfc

Browse files
authored
Add autocomplete="new-password" to password fields (rails#52491)
Added `autocomplete="new-password"` to help password managers.
1 parent 7a0bf93 commit e686cfc

File tree

1 file changed

+2
-2
lines changed
  • railties/lib/rails/generators/erb/authentication/templates/views/passwords

1 file changed

+2
-2
lines changed

railties/lib/rails/generators/erb/authentication/templates/views/passwords/edit.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<%%= tag.div(flash[:alert], style: "color:red") if flash[:alert] %>
44

55
<%%= form_with url: password_path(params[:token]), method: :put do |form| %>
6-
<%%= form.password_field :password, required: true, autocomplete: "off", placeholder: "Enter new password", maxlength: 72 %><br>
7-
<%%= form.password_field :password_confirmation, required: true, autocomplete: "off", placeholder: "Repeat new password", maxlength: 72 %><br>
6+
<%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72 %><br>
7+
<%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72 %><br>
88
<%%= form.submit "Save" %>
99
<%% end %>

0 commit comments

Comments
 (0)