= provide(:title, "Settings")

.row
  .col-sm-offset-3.col-sm-6

    h2 Settings
      
    .well
      = gravatar_for(current_user, size: 48)
      p = link_to "Update picture", "http://gravatar.com/emails"
      p = render 'shared/social_connect'
      
    = simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
      = f.error_notification
      .form-inputs
        = f.input :email, required: true, autofocus: true
        - if devise_mapping.confirmable? && resource.pending_reconfirmation?
          p
            | Currently waiting confirmation for: 
            = resource.unconfirmed_email
            
        -# If user do not have a password, it means this user is 
        -# registered with a social account. So password is irrelevant.
        - if current_user.password.present?
          = f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false
          = f.input :password_confirmation, required: false
          = f.input :current_password, hint: "we need your current password to confirm your changes", required: true
      .form-group
        = f.button :submit, "Update"
    
    hr
        
    h3
      | Cancel my account
    p
      | Unhappy? 
      = link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete
    = link_to "Back", :back

= provide(:title, "Settings")

.row
  .col-sm-offset-3.col-sm-6

    h2 Settings
      
    .well
      = gravatar_for(current_user, size: 48)
      p = link_to "Update picture", "http://gravatar.com/emails"
      p = render 'shared/social_connect'
      
    = simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
      = f.error_notification
      .form-inputs
        = f.input :email, required: true, autofocus: true
        - if devise_mapping.confirmable? && resource.pending_reconfirmation?
          p
            | Currently waiting confirmation for: 
            = resource.unconfirmed_email
            
      .form-group
        = f.button :submit, "Update"
    
    hr
        
    h3
      | Cancel my account
    p
      | Unhappy? 
      = link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete
    = link_to "Back", :back

Remove password fields from settings form
Remove password fields from settings form

mnishiguchi/estimate_moving,mnishiguchi/estimate_moving,mnishiguchi/estimate_moving