edit.html.erb 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 :name, autofocus: false, class: 'form-control', placeholder: "Full Name" %>
  8. </div>
  9. <div class="form-group">
  10. <%= f.email_field :email, class: 'form-control', placeholder: 'Email Address' %>
  11. </div>
  12. <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
  13. <div class="alert alert-warning">Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
  14. <% end %>
  15. <div class="form-group">
  16. <%= f.password_field :password, autocomplete: "off", class: 'form-control', placeholder: 'Password' %>
  17. <p class="form-text text-muted"><small>Leave password blank if you don't want to change it</small></p>
  18. </div>
  19. <div class="form-group">
  20. <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control', placeholder: 'Confirm Password' %>
  21. </div>
  22. <div class="form-group">
  23. <%= f.password_field :current_password, autocomplete: "off", class: 'form-control', placeholder: 'Current Password' %>
  24. <p class="form-text text-muted"><small>We need your current password to confirm your changes</small></p>
  25. </div>
  26. <div class="form-group">
  27. <%= f.submit "Save Changes", class: 'btn btn-lg btn-block btn-primary' %>
  28. </div>
  29. <% end %>
  30. <hr>
  31. <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>
  32. </div>
  33. </div>