add password reset
This commit is contained in:
22
app/views/users/lost_password.html.erb
Normal file
22
app/views/users/lost_password.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<% title "Reset password" %>
|
||||
|
||||
<h1>Reset password</h1>
|
||||
<p>You lost your password? Don't do that!</p>
|
||||
<p>Luckily for you, you can reset your password. Please use the command <code>/tokengen <your email adress></code>, then fill in the form below:</p>
|
||||
<%= form_tag reset_password_users_path do |f| %>
|
||||
<table>
|
||||
<tr>
|
||||
<td><%= label_tag :email %></td>
|
||||
<td><%= text_field_tag :email, nil, placeholder: "steve@example.com", required: true, pattern: ".+@.+", title: "enter valid email adress", "x-moz-errormessage" => "enter valid email adress" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= label_tag :secret_token %></td>
|
||||
<td><%= text_field_tag :secret_token, nil, placeholder: "abcdef", required: true, pattern: "[a-z]{6}", title: "6 character token", "x-moz-errormessage" => "6 character token" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= label_tag :new_password %></td>
|
||||
<td><%= password_field_tag :new_password, nil, placeholder: "secret", required: true, pattern: ".{8,}", title: "minimum 8 characters", "x-moz-errormessage" => "minimum 8 characters" %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><%= submit_tag "Reset password", class: "btn blue" %></p>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user