edit.html.erb 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div class="row">
  2. <div class="col-lg-4 col-md-6 ml-auto mr-auto">
  3. <h1 class="text-center">Account</h1>
  4. <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
  5. <%= devise_error_messages! %>
  6. <div class="form-group">
  7. <%= f.text_field :first_name, autofocus: false, class: 'form-control', placeholder: "First Name" %>
  8. </div>
  9. <div class="form-group">
  10. <%= f.text_field :last_name, autofocus: false, class: 'form-control', placeholder: "Last Name" %>
  11. </div>
  12. <div class="form-group">
  13. <%= f.email_field :email, class: 'form-control', placeholder: 'Email Address' %>
  14. </div>
  15. <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
  16. <div class="alert alert-warning">Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
  17. <% end %>
  18. <div class="form-group">
  19. <%= f.password_field :password, autocomplete: "off", class: 'form-control', placeholder: 'Password' %>
  20. <p class="form-text text-muted"><small>Leave password blank if you don't want to change it</small></p>
  21. </div>
  22. <div class="form-group">
  23. <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control', placeholder: 'Confirm Password' %>
  24. </div>
  25. <div class="form-group">
  26. <%= f.password_field :current_password, autocomplete: "off", class: 'form-control', placeholder: 'Current Password' %>
  27. <p class="form-text text-muted"><small>We need your current password to confirm your changes</small></p>
  28. </div>
  29. <div class="form-group">
  30. <%= f.submit "Save Changes", class: 'btn btn-lg btn-block btn-primary' %>
  31. </div>
  32. <% end %>
  33. <hr>
  34. <p class="text-center"><%= link_to "Deactivate my account", registration_path(resource_name), data: { confirm: "Are you sure? You cannot undo this." }, method: :delete %></p>
  35. </div>
  36. </div>