Commit 779f48c7 by Đường Sỹ Hoàng

Updated password

parent dbb81abb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<p>Someone has requested a link to change your password. You can do this through the link below.</p> <p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p> <p><%= link_to 'Change my password', forgot_password_url(@resource, reset_password_token: @token) %></p>
<p>If you didn't request this, please ignore this email.</p> <p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p> <p>Your password won't change until you access the link above and create a new one.</p>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="card-header text-center"> <div class="card-header text-center">
<h2>Change your password</h2> <h2>Change your password</h2>
</div> </div>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> <%= form_for(resource, as: resource_name, url: reset_password_path(resource_name), html: { method: :put }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %> <%= render "devise/shared/error_messages", resource: resource %>
<%= f.hidden_field :reset_password_token %> <%= f.hidden_field :reset_password_token %>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="card-header text-center"> <div class="card-header text-center">
<h2>Forgot your password?</h2> <h2>Forgot your password?</h2>
</div> </div>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> <%= form_for(resource, as: resource_name, url: forgot_password_path(resource_name), html: { method: :post }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %> <%= render "devise/shared/error_messages", resource: resource %>
<div class="field"> <div class="field">
......
...@@ -13,5 +13,7 @@ Rails.application.routes.draw do ...@@ -13,5 +13,7 @@ Rails.application.routes.draw do
get "my/info", to: "devise/registrations#edit" get "my/info", to: "devise/registrations#edit"
get "my/", to: "users#show" get "my/", to: "users#show"
get "forgot_password", to: "devise/passwords#edit" get "forgot_password", to: "devise/passwords#edit"
get "reset_password", to: "devise/passwords#new"
post "forgot_password.user/", to: "devise/passwords#create"
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment