Split password reset functionality into PasswordsController

This commit is contained in:
Andy Allan 2021-04-07 14:39:12 +01:00
parent e751703983
commit 7a66c6d4eb
11 changed files with 242 additions and 220 deletions

View file

@ -0,0 +1,10 @@
<% content_for :heading do %>
<h1><%= t ".heading" %></h1>
<% end %>
<p><%= t ".help_text" %></p>
<%= bootstrap_form_tag do |f| %>
<%= f.text_field :email, :label => t(".email address") %>
<%= f.primary t(".new password button") %>
<% end %>

View file

@ -0,0 +1,10 @@
<% content_for :heading do %>
<h1><%= t ".heading", :user => current_user.display_name %></h1>
<% end %>
<%= bootstrap_form_for current_user, :url => { :action => "reset_password" }, :html => { :method => :post } do |f| %>
<%= f.hidden_field :token, :name => "token", :value => params[:token] %>
<%= f.password_field :pass_crypt, :value => "" %>
<%= f.password_field :pass_crypt_confirmation, :value => "" %>
<%= f.primary t(".reset") %>
<% end %>