2018-09-07 15:08:55 +00:00
- breadcrumb_title s_("Profiles|Edit Profile")
2020-06-22 12:08:47 +00:00
- page_title s_("Profiles|Edit Profile")
2022-09-23 12:13:18 +00:00
- add_page_specific_style 'page_bundles/profile'
2017-06-22 14:47:50 +00:00
- @content_class = "limit-container-width" unless fluid_layout
2018-09-07 15:08:55 +00:00
- gravatar_link = link_to Gitlab.config.gravatar.host, 'https://' + Gitlab.config.gravatar.host
2016-06-28 18:17:29 +00:00
2022-06-22 00:08:23 +00:00
= gitlab_ui_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user js-edit-user gl-mt-3 js-quick-submit gl-show-field-errors js-password-prompt-form', remote: true }, authenticity_token: true do |f|
2021-02-02 21:09:04 +00:00
.row.js-search-settings-section
2017-06-22 14:47:50 +00:00
.col-lg-4.profile-settings-sidebar
2020-05-21 18:08:27 +00:00
%h4.gl-mt-0
2021-05-19 18:10:39 +00:00
= s_("Profiles|Public avatar")
2016-02-29 11:37:27 +00:00
%p
- if @user.avatar?
2016-04-30 14:35:10 +00:00
- if gravatar_enabled?
2018-09-07 15:08:55 +00:00
= s_("Profiles|You can change your avatar here or remove the current avatar to revert to %{gravatar_link}").html_safe % { gravatar_link: gravatar_link }
- else
= s_("Profiles|You can change your avatar here")
2016-02-29 11:37:27 +00:00
- else
2016-04-30 14:35:10 +00:00
- if gravatar_enabled?
2018-09-07 15:08:55 +00:00
= s_("Profiles|You can upload your avatar here or change it at %{gravatar_link}").html_safe % { gravatar_link: gravatar_link }
- else
= s_("Profiles|You can upload your avatar here")
2020-04-28 15:09:29 +00:00
- if current_appearance&.profile_image_guidelines?
.md
= brand_profile_image_guidelines
2017-06-22 14:47:50 +00:00
.col-lg-8
2021-05-19 18:10:39 +00:00
.avatar-image
2018-02-09 10:43:12 +00:00
= link_to avatar_icon_for_user(@user, 400), target: '_blank', rel: 'noopener noreferrer' do
2022-09-30 18:08:31 +00:00
= render Pajamas::AvatarComponent.new(@user, size: 96, alt: "", class: 'gl-float-left gl-mr-5')
2020-05-21 18:08:27 +00:00
%h5.gl-mt-0= s_("Profiles|Upload new avatar")
2022-09-23 12:13:18 +00:00
.gl-display-flex.gl-align-items-center.gl-my-3
2022-09-29 18:08:16 +00:00
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-choose-user-avatar-button' }) do
= s_("Profiles|Choose file...")
2022-09-23 12:13:18 +00:00
%span.gl-ml-3.js-avatar-filename= s_("Profiles|No file chosen.")
2022-05-06 15:09:03 +00:00
= f.file_field :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
2021-05-19 18:10:39 +00:00
.gl-text-gray-500= s_("Profiles|The maximum file size allowed is 200KB.")
2016-02-29 11:37:27 +00:00
- if @user.avatar?
2022-09-29 18:08:16 +00:00
= render Pajamas::ButtonComponent.new(variant: :danger,
category: :secondary,
href: profile_avatar_path,
button_options: { class: 'gl-mt-3', data: { confirm: s_("Profiles|Avatar will be removed. Are you sure?") } },
method: :delete) do
= s_("Profiles|Remove avatar")
2021-02-02 21:09:04 +00:00
.col-lg-12
%hr
.row.js-search-settings-section
2018-07-31 08:21:53 +00:00
.col-lg-4.profile-settings-sidebar
2020-05-21 18:08:27 +00:00
%h4.gl-mt-0= s_("Profiles|Current status")
2018-07-31 08:21:53 +00:00
%p= s_("Profiles|This emoji and message will appear on your profile and throughout the interface.")
.col-lg-8
2022-09-12 21:10:38 +00:00
#js-user-profile-set-status-form
= f.fields_for :status, @user.status do |status_form|
= status_form.hidden_field :emoji, data: { js_name: 'emoji' }
= status_form.hidden_field :message, data: { js_name: 'message' }
= status_form.hidden_field :availability, data: { js_name: 'availability' }
= status_form.hidden_field :clear_status_after, data: { js_name: 'clearStatusAfter' }
2021-07-07 06:08:23 +00:00
.col-lg-12
%hr
2021-02-02 21:09:04 +00:00
.row.user-time-preferences.js-search-settings-section
.col-lg-4.profile-settings-sidebar
%h4.gl-mt-0= s_("Profiles|Time settings")
2022-06-22 15:09:48 +00:00
%p= s_("Profiles|Set your local time zone.")
2021-02-02 21:09:04 +00:00
.col-lg-8
2022-09-20 15:13:52 +00:00
= f.label :user_timezone, _("Time zone")
2022-10-25 15:10:55 +00:00
.js-timezone-dropdown{ data: { timezone_data: timezone_data.to_json, initial_value: @user.timezone, name: 'user[timezone]' } }
2021-02-02 21:09:04 +00:00
.col-lg-12
%hr
.row.js-search-settings-section
2017-06-22 14:47:50 +00:00
.col-lg-4.profile-settings-sidebar
2020-05-21 18:08:27 +00:00
%h4.gl-mt-0
2018-09-07 15:08:55 +00:00
= s_("Profiles|Main settings")
2016-02-29 11:37:27 +00:00
%p
2022-06-22 15:09:48 +00:00
= s_("Profiles|This information will appear on your profile.")
2016-02-29 11:37:27 +00:00
- if current_user.ldap_user?
2018-09-07 15:08:55 +00:00
= s_("Profiles|Some options are unavailable for LDAP accounts")
2017-06-22 14:47:50 +00:00
.col-lg-8
2017-06-13 17:13:01 +00:00
.row
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group.col-md-9.rspec-full-name
= render 'profiles/name', form: f, user: @user
.form-group.gl-form-group.col-md-3
= f.label :id, s_('Profiles|User ID')
= f.text_field :id, class: 'gl-form-input form-control', readonly: true
.form-group.gl-form-group
= f.label :pronouns, s_('Profiles|Pronouns')
2022-05-20 12:08:50 +00:00
= f.text_field :pronouns, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-05-06 15:09:03 +00:00
%small.form-text.text-gl-muted
2022-06-22 15:09:48 +00:00
= s_("Profiles|Enter your pronouns to let people know how to refer to you.")
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :pronunciation, s_('Profiles|Pronunciation')
2022-05-20 12:08:50 +00:00
= f.text_field :pronunciation, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-05-06 15:09:03 +00:00
%small.form-text.text-gl-muted
2022-06-22 15:09:48 +00:00
= s_("Profiles|Enter how your name is pronounced to help people address you correctly.")
2021-09-17 12:12:06 +00:00
= render_if_exists 'profiles/extra_settings', form: f
2019-03-20 10:36:22 +00:00
= render_if_exists 'profiles/email_settings', form: f
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :skype
2022-05-20 12:08:50 +00:00
= f.text_field :skype, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|username")
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :linkedin
2022-05-20 12:08:50 +00:00
= f.text_field :linkedin, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-05-06 15:09:03 +00:00
%small.form-text.text-gl-muted
= s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename")
.form-group.gl-form-group
= f.label :twitter
2022-05-20 12:08:50 +00:00
= f.text_field :twitter, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|@username")
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :website_url, s_('Profiles|Website url')
2022-05-20 12:08:50 +00:00
= f.text_field :website_url, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|https://website.com")
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :location, s_('Profiles|Location')
- if @user.read_only_attribute?(:location)
2022-05-20 12:08:50 +00:00
= f.text_field :location, class: 'gl-form-input form-control gl-md-form-input-lg', readonly: true
2022-05-06 15:09:03 +00:00
%small.form-text.text-gl-muted
= s_("Profiles|Your location was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:location) }
- else
2022-05-20 12:08:50 +00:00
= f.text_field :location, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|City, country")
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :job_title, s_('Profiles|Job title')
2022-05-20 12:08:50 +00:00
= f.text_field :job_title, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :organization, s_('Profiles|Organization')
2022-05-20 12:08:50 +00:00
= f.text_field :organization, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-05-06 15:09:03 +00:00
%small.form-text.text-gl-muted
2022-06-22 15:09:48 +00:00
= s_("Profiles|Who you represent or work for.")
2022-05-06 15:09:03 +00:00
.form-group.gl-form-group
= f.label :bio, s_('Profiles|Bio')
= f.text_area :bio, class: 'gl-form-input gl-form-textarea form-control', rows: 4, maxlength: 250
%small.form-text.text-gl-muted
2022-06-22 15:09:48 +00:00
= s_("Profiles|Tell us about yourself in fewer than 250 characters.")
2018-07-24 12:46:19 +00:00
%hr
2022-05-06 15:09:03 +00:00
%fieldset.form-group.gl-form-group
%legend.col-form-label.col-form-label
= _('Private profile')
2022-06-22 15:09:48 +00:00
- private_profile_label = s_("Profiles|Don't display activity-related personal information on your profile.")
2022-05-06 15:09:03 +00:00
- private_profile_help_link = link_to sprite_icon('question-o'), help_page_path('user/profile/index.md', anchor: 'make-your-user-profile-page-private')
= f.gitlab_ui_checkbox_component :private_profile, '%{private_profile_label} %{private_profile_help_link}'.html_safe % { private_profile_label: private_profile_label, private_profile_help_link: private_profile_help_link.html_safe }
%fieldset.form-group.gl-form-group
%legend.col-form-label.col-form-label
= s_("Profiles|Private contributions")
= f.gitlab_ui_checkbox_component :include_private_contributions,
s_('Profiles|Include private contributions on my profile'),
2022-06-22 15:09:48 +00:00
help_text: s_("Profiles|Choose to show contributions of private projects on your public profile without any project, repository or organization information.")
2022-09-20 18:13:03 +00:00
.row.js-hide-when-nothing-matches-search
.col-lg-12
%hr
2022-09-27 12:10:16 +00:00
= f.submit s_("Profiles|Update profile settings"), class: 'gl-mr-3 js-password-prompt-btn', pajamas_button: true
2022-09-29 18:08:16 +00:00
= render Pajamas::ButtonComponent.new(href: user_path(current_user)) do
= s_('TagsPage|Cancel')
2016-03-17 14:48:47 +00:00
2021-09-29 12:11:22 +00:00
#password-prompt-modal
2020-10-05 12:08:47 +00:00
.modal.modal-profile-crop{ data: { cropper_css_path: ActionController::Base.helpers.stylesheet_path('lazy_bundles/cropper.css') } }
2016-03-17 14:48:47 +00:00
.modal-dialog
.modal-content
.modal-header
%h4.modal-title
2018-09-07 15:08:55 +00:00
= s_("Profiles|Position and size your new avatar")
2022-09-29 18:08:16 +00:00
= render Pajamas::ButtonComponent.new(category: :tertiary,
icon: 'close',
button_options: { class: 'close', "data-dismiss": "modal", "aria-label" => _("Close") })
2016-03-17 14:48:47 +00:00
.modal-body
.profile-crop-image-container
2018-09-07 15:08:55 +00:00
%img.modal-profile-crop-image{ alt: s_("Profiles|Avatar cropper") }
2022-09-23 12:13:18 +00:00
.gl-text-center.gl-mt-4
2016-03-17 14:48:47 +00:00
.btn-group
2022-09-29 18:08:16 +00:00
= render Pajamas::ButtonComponent.new(icon: 'search-minus',
button_options: {data: { method: 'zoom', option: '-0.1' }})
= render Pajamas::ButtonComponent.new(icon: 'search-plus',
button_options: {data: { method: 'zoom', option: '0.1' }})
2016-03-17 14:48:47 +00:00
.modal-footer
2022-09-29 18:08:16 +00:00
= render Pajamas::ButtonComponent.new(variant: :confirm,
button_options: { class: 'js-upload-user-avatar'}) do
2018-09-07 15:08:55 +00:00
= s_("Profiles|Set new profile picture")