Add password reset

Closes #15
This commit is contained in:
ricola 2025-06-07 18:38:33 -06:00
parent 84278741a5
commit fa4f77c365
14 changed files with 222 additions and 32 deletions

21
views/reset_change.erb Normal file
View file

@ -0,0 +1,21 @@
<h1><%= _("Reset password") %></h1>
<% if @errors %>
<% @errors.each do |error| %>
<% if error.attribute == :password and error.type == :blank %>
<p class="error"><%= _("Specify a password.") %></p>
<% end %>
<% end %>
<% end %>
<form action="/reset/<%= params[:uuid] %>" method="post">
<p>
<label for="email"><%= _("Email") %></label>
<span><%= @user.email %></span>
</p>
<p>
<label for="password"><%= _("Password") %></label>
<input type="password" name="password" value="<%= params[:password] %>">
</p>
<button type="submit"><%= _("Reset password") %></button>
</form>