app/views/devise/registrations/edit.html.haml
%header.row
%h2.column.small-12 Edit #{resource_name.to_s.humanize} Settings
= simple_form_for(resource, as: resource_name,
url: registration_path(resource_name), html: { method: :put }) do |f|
.row
.column.small-12
= f.error_notification
.column.small-12.medium-6
= f.input :username
.column.small-12.medium-6
= f.input :email
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
.column.small-12
Currently awaiting confirmation for #{resource.unconfirmed_email}
.column.small-12.medium-6
= f.input :password, label: 'New Password',
placeholder: 'Leave blank if do not wish to change password'
.column.small-12.medium-6
= f.input :password_confirmation, label: 'Confirm New Password'
.column.small-12.medium-6
= f.input :current_password,
placeholder: 'Must enter current password to confirm changes'
.column.small-12
= f.button :submit, class: 'button small'
.row#cancel-account
%p.column.small-12 Unhappy?
.column.small-12
= button_to 'Cancel my account', registration_path(resource_name),
data: { confirm: 'Are you sure?' }, method: :delete, class: 'button small'