Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. app/views/devise/registrations/edit.html.erb
  2.  
  3. <h2>Edit <%= resource_name.to_s.humanize %></h2>
  4.  
  5. <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
  6. <%# render "devise/shared/error_messages", resource: resource %>
  7.  
  8. <div class="field">
  9. <%= f.label :email %><br />
  10. <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
  11. </div>
  12.  
  13. <div class="field">
  14. <%= label_tag :name %><br />
  15. <%= f.text_field :display_name, required: true, wrapper: :inline %>
  16. </div>
  17.  
  18. <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
  19. <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
  20. <% end %>
  21.  
  22. <div class="field">
  23. <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
  24. <%= f.password_field :password, autocomplete: "new-password" %>
  25. <% if @minimum_password_length %>
  26. <br />
  27. <em><%= @minimum_password_length %> characters minimum</em>
  28. <% end %>
  29. </div>
  30.  
  31. <div class="field">
  32. <%= f.label :password_confirmation %><br />
  33. <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
  34. </div>
  35.  
  36. <div class="field">
  37. <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
  38. <%= f.password_field :current_password, autocomplete: "current-password" %>
  39. </div>
  40.  
  41. <div class="actions">
  42. <%= f.submit "Update" %>
  43. </div>
  44. <% end %>
  45.  
  46. <h3>Cancel my account</h3>
  47.  
  48. <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
  49.  
  50. <%= link_to "Back", :back %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement