2022-06-26 10:16:31 -07:00
|
|
|
.card
|
|
|
|
.card-body
|
2022-09-04 05:54:28 -07:00
|
|
|
= bootstrap_form_for(current_user, url: settings_profile_picture_path, html: { multipart: true }, method: :patch, data: { turbo: false }) do |f|
|
2022-06-26 10:16:31 -07:00
|
|
|
|
2023-01-22 08:58:23 -08:00
|
|
|
%div{ data: { controller: "cropper", cropper_aspect_ratio_value: "1" } }
|
2023-01-22 08:48:53 -08:00
|
|
|
.d-flex
|
2023-01-22 08:44:08 -08:00
|
|
|
.flex-shrink-0
|
2023-10-20 02:45:53 -07:00
|
|
|
= render AvatarComponent.new(user: current_user, size: "lg", classes: ["me-3"])
|
2023-01-22 08:44:08 -08:00
|
|
|
.flex-grow-1
|
2023-12-11 15:20:27 -08:00
|
|
|
= f.file_field :profile_picture, accept: current_user.profile_picture.content_type_whitelist.join(','), data: { cropper_target: "input", action: "cropper#change" }
|
2023-01-22 08:44:08 -08:00
|
|
|
|
2023-01-22 08:48:53 -08:00
|
|
|
.row.d-none{ data: { cropper_target: "controls" } }
|
2023-01-22 08:44:08 -08:00
|
|
|
.col-sm-10.col-md-8
|
|
|
|
%strong= t(".adjust.profile_picture")
|
2023-01-22 08:48:53 -08:00
|
|
|
%img{ src: current_user.profile_picture.url(:medium), data: { cropper_target: "cropper" } }
|
2023-01-22 08:44:08 -08:00
|
|
|
|
|
|
|
- %i[profile_picture_x profile_picture_y profile_picture_w profile_picture_h].each do |attrib|
|
|
|
|
= f.hidden_field attrib, id: attrib, data: { cropper_target: attrib.to_s.split("_").last }
|
|
|
|
|
2023-01-22 08:58:23 -08:00
|
|
|
%div{ data: { controller: "cropper", cropper_aspect_ratio_value: "0.23" } }
|
2023-01-22 08:48:53 -08:00
|
|
|
.row.mb-2
|
2023-01-22 08:44:08 -08:00
|
|
|
.col-xs-12.col-md-6
|
|
|
|
%img.mw-100.me-3{ src: current_user.profile_header.url(:mobile) }
|
|
|
|
.col-xs-12.col-md-6.mt-3.mt-sm-0.ps-3.pe-3
|
2023-12-11 15:20:27 -08:00
|
|
|
= f.file_field :profile_header, accept: current_user.profile_header.content_type_whitelist.join(','), data: { cropper_target: "input", action: "cropper#change" }
|
2023-01-22 08:44:08 -08:00
|
|
|
|
2023-01-22 08:48:53 -08:00
|
|
|
.row.d-none{ data: { cropper_target: "controls" } }
|
2023-01-22 08:44:08 -08:00
|
|
|
.col-sm-10.col-md-8
|
|
|
|
%strong= t(".adjust.profile_header")
|
2023-01-22 08:48:53 -08:00
|
|
|
%img{ src: current_user.profile_header.url(:web), data: { cropper_target: "cropper" } }
|
2023-01-22 08:44:08 -08:00
|
|
|
|
|
|
|
- %i[profile_header_x profile_header_y profile_header_w profile_header_h].each do |attrib|
|
|
|
|
= f.hidden_field attrib, id: attrib, data: { cropper_target: attrib.to_s.split("_").last }
|
2022-06-26 10:16:31 -07:00
|
|
|
|
|
|
|
= f.check_box :show_foreign_themes
|
|
|
|
|
2023-01-04 06:39:27 -08:00
|
|
|
= f.primary t(".submit_picture")
|
2022-06-26 10:16:31 -07:00
|
|
|
.card
|
|
|
|
.card-body
|
2022-09-04 05:54:28 -07:00
|
|
|
= bootstrap_form_for(current_user.profile, html: { multipart: true }, method: :patch, data: { turbo: false }) do |f|
|
2022-06-26 10:16:31 -07:00
|
|
|
|
2022-06-28 13:51:16 -07:00
|
|
|
= f.text_field :display_name, autocomplete: :name
|
2022-06-26 10:16:31 -07:00
|
|
|
|
|
|
|
= f.text_field :motivation_header
|
|
|
|
|
2022-06-28 13:51:16 -07:00
|
|
|
= f.text_field :anon_display_name, placeholder: APP_CONFIG["anonymous_name"], autocomplete: :off
|
2022-06-26 10:16:31 -07:00
|
|
|
|
2022-06-28 13:51:16 -07:00
|
|
|
= f.url_field :website, autocomplete: :url
|
2022-06-26 10:16:31 -07:00
|
|
|
|
2022-06-28 13:51:16 -07:00
|
|
|
= f.text_field :location, autocomplete: "address-level2"
|
2022-06-26 10:16:31 -07:00
|
|
|
|
|
|
|
= f.text_area :description
|
|
|
|
|
2023-01-08 04:13:03 -08:00
|
|
|
= f.check_box :allow_long_questions
|
|
|
|
|
2022-06-26 10:16:31 -07:00
|
|
|
= f.primary
|
|
|
|
|
|
|
|
- provide(:title, generate_title(t(".title")))
|
|
|
|
- parent_layout "user/settings"
|