You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB

  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. <%= render "devise/shared/error_messages", resource: resource %>
  4. <div class="field">
  5. <%= f.label :email %><br />
  6. <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
  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: "new-password" %>
  14. <% if @minimum_password_length %>
  15. <br />
  16. <em><%= @minimum_password_length %> characters minimum</em>
  17. <% end %>
  18. </div>
  19. <div class="field">
  20. <%= f.label :password_confirmation %><br />
  21. <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
  22. </div>
  23. <div class="field">
  24. <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
  25. <%= f.password_field :current_password, autocomplete: "current-password" %>
  26. </div>
  27. <div class="actions">
  28. <%= f.submit "Update" %>
  29. </div>
  30. <% end %>
  31. <h3>Cancel my account</h3>
  32. <div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
  33. <%= link_to "Back", :back %>