songtianlun
43d39c3010
- Implement PasswordResetsController with new and create actions - Add views for new and edit password reset forms - Update routes to include password reset paths - Create migration to add reset_digest and reset_send_at to users This commit introduces a complete password reset feature, allowing users to request a password reset via email. It includes the necessary controller actions, views, and database schema updates. The user experience is enhanced with a link to the password reset form on the login page.
25 lines
753 B
Plaintext
25 lines
753 B
Plaintext
<% provide(:title, "Log in") %>
|
|
|
|
<h1>Log in</h1>
|
|
<div class ="row">
|
|
<div class="col-md-6 col-md-offset-3">
|
|
<%= form_with(url: login_path, scope: :session, local: true) do |f| %>
|
|
<%= f.label :email %>
|
|
<%= f.email_field :email, class: 'form-control' %>
|
|
|
|
<%= f.label :password %>
|
|
<%= link_to "(forgot password)", new_password_reset_path %>
|
|
<%= f.password_field :password, class: 'form-control' %>
|
|
|
|
<%= f.label :remember_me, class: "checkbox inline" do %>
|
|
<%= f.check_box :remember_me %>
|
|
<span>Remember me on this computer</span>
|
|
<% end %>
|
|
|
|
<%= f.submit "Log in", class: "btn btn-primary" %>
|
|
<% end %>
|
|
|
|
<p>New user? <%= link_to "Sign up now!", signup_path %></p>
|
|
</div>
|
|
</div>
|