.panel.panel-default
  .panel-heading
      h1.panel-title = title t("devise.registrations.edit.title", resource: resource_class.model_name.human)
  .panel-body
    = simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
      .form-inputs
        = f.input :current_password, hint: t("devise.registrations.edit.we_need_your_current_password_to_confirm_your_changes"), required: true
        = f.input :email, required: true, autofocus: true
        - if devise_mapping.confirmable? && resource.pending_reconfirmation?
          p
            = t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email)
        = f.input :password, autocomplete: "off", hint: t("devise.registrations.edit.leave_blank_if_you_don_t_want_to_change_it"), required: false
        = f.input :password_confirmation, required: false
        = f.input :first_name
        = f.input :last_name
        = f.input :street
        = f.input :city
        = f.input :zip
        = f.input :support, as: :radio_buttons, collection: t('support_type').map{ |x| [x.first, raw(x.last)]}, label_method: :last, value_method: :first
        = f.input :age_category, as: :radio_buttons, collection: t('age_category'), label_method: :last, value_method: :first
        = f.input :language, as: :radio_buttons, collection: t('languages').map{ |x| [x.first, raw(x.last)]}, label_method: :last, value_method: :first
      .form-actions
        = f.button :submit, t("devise.registrations.edit.update"), class: 'btn btn-primary'
    p = link_to t("devise.shared.links.back"), :back
hr
p = link_to t("devise.registrations.edit.cancel_my_account"), registration_path(resource_name), data: { confirm: t("devise.registrations.edit.are_you_sure") }, method: :delete, class: 'btn btn-danger btn-sm pull-right'

