forked from fixin.me/fixin.me
Update and test password recovery forms
This commit is contained in:
@@ -1,25 +1,13 @@
|
||||
<h2>Change your password</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= tabular_form_for resource, url: user_password_path, html: { method: :put } do |f| %>
|
||||
<%= render "users/shared/error_messages", resource: resource %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password, "New password" %><br />
|
||||
<% if @minimum_password_length %>
|
||||
<em>(<%= @minimum_password_length %> characters minimum)</em><br />
|
||||
<% end %>
|
||||
<%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
|
||||
</div>
|
||||
<%= f.hidden_field :reset_password_token, label: false %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation, "Confirm new password" %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
||||
</div>
|
||||
<%= f.password_field :password, label: t('.new_password'),
|
||||
required: true, size: 30, autofocus: true, autocomplete: "new-password",
|
||||
hint: ("(#{@minimum_password_length} characters minimum)" if @minimum_password_length) %>
|
||||
<%= f.password_field :password_confirmation, label: t('.password_confirmation'),
|
||||
required: true, size: 30, autocomplete: "new-password" %>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Change my password" %>
|
||||
</div>
|
||||
<%= f.submit t('.update_password') %>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= tabular_form_for resource, url: user_password_path, html: { method: :post } do |f| %>
|
||||
<%= render "users/shared/error_messages", resource: resource %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||
</div>
|
||||
<%= f.email_field :email, required: true, size: 30, autofocus: true, autocomplete: "email" %>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Send me reset password instructions" %>
|
||||
</div>
|
||||
<%= f.submit t(:recover_password) %>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
|
||||
Reference in New Issue
Block a user