clarion/lib/initfest/views/public/personal_profiles/_form.slim

38 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-08-15 04:33:02 +03:00
= simple_form_for @profile, wrapper: :default, url: personal_profile_path do |f|
= f.error_notification
.form-inputs
2015-08-15 09:00:06 +03:00
.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}
2015-08-15 04:33:02 +03:00
= 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
2015-08-15 08:09:46 +03:00
= 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)