webdev.camp/app/views/devise/registrations/edit.html.haml

40 lines
1.6 KiB
Plaintext

.authform
%h3
Edit Profile
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :role => 'form'}) do |f|
= devise_error_messages!
.form-group
= f.label :name
= f.text_field :name, :autofocus => true, class: 'form-control'
.form-group
= f.label :email
= f.email_field :email, class: 'form-control'
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
%div
Currently waiting confirmation for: #{resource.unconfirmed_email}
.form-group
= f.label :street
= f.text_field :street, class: 'form-control'
.form-group
= f.label :city
= f.text_field :city, class: 'form-control'
.form-group
= f.label :country
= f.text_field :country, class: 'form-control'
%p Leave these fields blank if you don't want to change your password.
.form-group
= f.label :password
= f.password_field :password, :autocomplete => 'off', class: 'form-control'
.form-group
= f.label :password_confirmation
= f.password_field :password_confirmation, class: 'form-control'
%p You must enter your current password to make changes.
.form-group
= f.label :current_password
= f.password_field :current_password, class: 'form-control'
= f.submit 'Update', :class => 'btn btn-success'
.authform
%h3 Cancel Account
%p Unhappy? We'll be sad to see you go.
= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => 'btn btn-danger'