edit.html.erb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <h2>Edit <%= resource_name.to_s.humanize %></h2>
  2. <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
  3. <%= devise_error_messages! %>
  4. <div class="field">
  5. <%= f.label :email %><br />
  6. <%= f.email_field :email, autofocus: true %>
  7. </div>
  8. <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
  9. <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
  10. <% end %>
  11. <div class="field">
  12. <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
  13. <%= f.password_field :password, autocomplete: "off" %>
  14. </div>
  15. <div class="field">
  16. <%= f.label :password_confirmation %><br />
  17. <%= f.password_field :password_confirmation, autocomplete: "off" %>
  18. </div>
  19. <div class="field">
  20. <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
  21. <%= f.password_field :current_password, autocomplete: "off" %>
  22. </div>
  23. <div class="actions">
  24. <%= f.submit "Update" %>
  25. </div>
  26. <% end %>
  27. <h3>Cancel my account</h3>
  28. <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
  29. <%= link_to "Back", :back %>