<% content_for :title, "Account" -%>

Edit <%= resource_name.to_s.humanize %>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'form-horizontal' }) do |f| %> <%= devise_error_messages! %>
<%= f.label :email, class: 'col-md-4 control-label' %>
<%= f.email_field :email, autofocus: true, class: 'form-control' %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
<% end %>
<%= f.label :username, class: 'col-md-4 control-label' %>
<%= f.text_field :username, class: 'form-control' %>
<%= f.label :current_password, class: 'col-md-4 control-label' %>
<%= f.password_field :current_password, class: 'form-control' %> We need your current password to confirm your changes.
<%= f.submit "Update", class: "btn btn-primary" %>
<% end %>

Change password

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'form-horizontal' }) do |f| %> <%= devise_error_messages! %>
<%= f.label :current_password, class: 'col-md-4 control-label' %>
<%= f.password_field :current_password, class: 'form-control' %> We need your current password to confirm your changes.
<%= f.label :password, class: 'col-md-4 control-label' %>
<%= f.password_field :password, autocomplete: "off", class: 'form-control' %>
<%= f.label :password_confirmation, class: 'col-md-4 control-label' %>
<%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %>
<%= f.submit "Update", class: "btn btn-primary" %>
<% end %>

Cancel my account

Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>

<%= link_to "Back", :back %>