%h2= @page_title = current_user.first_name + "'s Account"
- unless resource.confirmed?
.alert.alert-danger Your account is not yet confirmed!
= simple_form_for resource, url: registration_path(resource_name), html: { class: 'form-horizontal' } do |f|
= f.input :name, as: :string
= f.input :email
= f.input :password, :required => false, :input_html => {:autocomplete => "off"}, :hint => "leave blank if you don't want to change it"
= f.input :password_confirmation, :required => false
= f.input :current_password, :required => true, :hint => "we need your current password to confirm your changes"
= f.button :wrapped, 'Update'
- unless resource.confirmed?
%h3 Confirmation
%p Your account is not yet confirmed.
= link_to 'Resend confirmation E-Mail!', confirmation_path(resource_name, user: {email: resource.email}), method: :post, class: 'btn btn-default', disable_with: t(:wait)
%h3#api_key= t(:api_key_headline)
= simple_form_for [:users, blank_api_key] do |f|
- if api_key
= f.input :key, as: :string, readonly: true, input_html: {value: api_key.key}
= f.button :wrapped, t(:generate_api_key)
- else
= f.button :wrapped, t(:generate_initial_api_key)
%h3 Cancel my account
%p Unhappy?
= link_to 'Cancel my account', registration_path(resource_name), confirm: 'Are you sure?', method: :delete, class: 'btn btn-danger'