= simple_form_for @profile, wrapper: :default, url: personal_profile_path do |f|
  = f.error_notification

  .form-inputs
    .input
      = image_tag(@profile.picture.variant(resize_to_limit: [150, 150])) if @profile.picture.attached?
      = f.hidden_field :picture, value: @profile.picture.signed_id if @profile.picture.attached?
      = f.input :picture, as: :file, required: true, wrapper: false, input_html: {direct_upload: true}
    = f.input :first_name, autofocus: true
    = f.input :last_name
    = f.input :public_email
    = f.input :organisation
    = f.input :github
    = f.input :twitter
    = f.input :mobile_phone, input_html: {value: @profile.mobile_phone.try(:phony_formatted, format: :international)}
    = f.input :biography

  .form-actions
    = f.button :submit

h3.entry-title = t :login_data

= simple_form_for(current_user, wrapper: :default, as: :user, url: registration_path(:user), html: { method: :put, multipart: true }) do |f|
  .form-inputs
    = f.input :email, required: true
    = f.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default

    - if current_user.pending_reconfirmation?
      p
        = t :expected_validation, email: current_user.unconfirmed_email

    = f.input :password, autocomplete: "off", hint: t(:pass_update_hint1), required: false
    = f.input :password_confirmation, required: false
    = f.input :current_password, hint: t(:pass_update_hint2), required: true

  .form-actions
    = f.button :submit, t(:update)