feature/share-libs
erb 43 lines 1.47 KB
Raw
1 <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
3 <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4 <%= render "devise/shared/error_messages", resource: resource %>
5
6 <div class="field">
7 <%= f.label :email %><br />
8 <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9 </div>
10
11 <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
12 <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
13 <% end %>
14
15 <div class="field">
16 <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
17 <%= f.password_field :password, autocomplete: "new-password" %>
18 <% if @minimum_password_length %>
19 <br />
20 <em><%= @minimum_password_length %> characters minimum</em>
21 <% end %>
22 </div>
23
24 <div class="field">
25 <%= f.label :password_confirmation %><br />
26 <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
27 </div>
28
29 <div class="field">
30 <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
31 <%= f.password_field :current_password, autocomplete: "current-password" %>
32 </div>
33
34 <div class="actions">
35 <%= f.submit "Update" %>
36 </div>
37 <% end %>
38
39 <h3>Cancel my account</h3>
40
41 <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
42
43 <%= link_to "Back", :back %>