Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/profiles')
-rw-r--r--app/views/profiles/_email_settings.html.haml43
-rw-r--r--app/views/profiles/_name.html.haml10
-rw-r--r--app/views/profiles/accounts/show.html.haml8
-rw-r--r--app/views/profiles/notifications/show.html.haml4
-rw-r--r--app/views/profiles/preferences/show.html.haml7
-rw-r--r--app/views/profiles/show.html.haml120
-rw-r--r--app/views/profiles/two_factor_auths/show.html.haml6
7 files changed, 135 insertions, 63 deletions
diff --git a/app/views/profiles/_email_settings.html.haml b/app/views/profiles/_email_settings.html.haml
index 1057e96f442..35cad79b6fd 100644
--- a/app/views/profiles/_email_settings.html.haml
+++ b/app/views/profiles/_email_settings.html.haml
@@ -5,15 +5,34 @@
- help_text = email_change_disabled ? s_("Your account uses dedicated credentials for the \"%{group_name}\" group and can only be updated through SSO.") % { group_name: @user.managing_group.name } : read_only_help_text
- password_automatically_set = @user.password_automatically_set?
-= form.text_field :email, required: true, class: 'input-lg gl-form-input', value: (@user.email unless @user.temp_oauth_email?), help: help_text.html_safe, readonly: readonly || email_change_disabled
-- unless password_automatically_set
- = hidden_field_tag 'user[validation_password]', :validation_password, class: 'js-password-prompt-field', help: s_("Profiles|Enter your password to confirm the email change")
-= form.select :public_email, options_for_select(@user.public_verified_emails, selected: @user.public_email),
- { help: s_("Profiles|This email will be displayed on your public profile"), include_blank: s_("Profiles|Do not show on profile") },
- control_class: 'select2 input-lg', disabled: email_change_disabled
-- commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits', target: '_blank')
-- commit_email_link_start = '<a href="%{url}">'.html_safe % { url: commit_email_link_url }
-- commit_email_docs_link = s_('Profiles|This email will be used for web based operations, such as edits and merges. %{commit_email_link_start}Learn more%{commit_email_link_end}').html_safe % { commit_email_link_start: commit_email_link_start, commit_email_link_end: '</a>'.html_safe }
-= form.select :commit_email, options_for_select(commit_email_select_options(@user), selected: @user.commit_email),
- { help: commit_email_docs_link },
- control_class: 'select2 input-lg', disabled: email_change_disabled
+.form-group.gl-form-group
+ = form.label :email, _('Email')
+ = form.text_field :email, required: true, class: 'gl-form-input form-control gl-form-input-lg', value: (@user.email unless @user.temp_oauth_email?), readonly: readonly || email_change_disabled
+ %small.form-text.text-gl-muted
+ = help_text.html_safe
+
+ - unless password_automatically_set
+ = hidden_field_tag 'user[validation_password]', :validation_password, class: 'js-password-prompt-field', help: s_("Profiles|Enter your password to confirm the email change")
+
+.form-group.gl-form-group
+ = form.label :public_email, s_('Profiles|Public email')
+ .gl-form-input-lg
+ = form.select :public_email,
+ options_for_select(@user.public_verified_emails, selected: @user.public_email),
+ { include_blank: s_("Profiles|Do not show on profile") },
+ { class: 'gl-form-select custom-select', disabled: email_change_disabled }
+ %small.form-text.text-gl-muted
+ = s_("Profiles|This email will be displayed on your public profile")
+
+.form-group.gl-form-group
+ - commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits', target: '_blank')
+ - commit_email_link_start = '<a href="%{url}">'.html_safe % { url: commit_email_link_url }
+ - commit_email_docs_link = s_('Profiles|This email will be used for web based operations, such as edits and merges. %{commit_email_link_start}Learn more%{commit_email_link_end}').html_safe % { commit_email_link_start: commit_email_link_start, commit_email_link_end: '</a>'.html_safe }
+ = form.label :commit_email, s_('Profiles|Commit email')
+ .gl-form-input-lg
+ = form.select :commit_email,
+ options_for_select(commit_email_select_options(@user), selected: @user.commit_email),
+ {},
+ { class: 'gl-form-select custom-select', disabled: email_change_disabled }
+ %small.form-text.text-gl-muted
+ = commit_email_docs_link
diff --git a/app/views/profiles/_name.html.haml b/app/views/profiles/_name.html.haml
index aea38bf4c3b..5af4fe24d62 100644
--- a/app/views/profiles/_name.html.haml
+++ b/app/views/profiles/_name.html.haml
@@ -1,5 +1,9 @@
+= form.label :name, s_('Profiles|Full name')
- if user.read_only_attribute?(:name)
- = form.text_field :name, class: 'gl-form-input', required: true, readonly: true, wrapper: { class: 'col-md-9 qa-full-name rspec-full-name' },
- help: s_("Profiles|Your name was automatically set based on your %{provider_label} account, so people you know can recognize you") % { provider_label: attribute_provider_label(:name) }
+ = form.text_field :name, class: 'gl-form-input form-control', required: true, readonly: true
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Your name was automatically set based on your %{provider_label} account, so people you know can recognize you") % { provider_label: attribute_provider_label(:name) }
- else
- = form.text_field :name, class: 'gl-form-input', label: s_('Profiles|Full name'), required: true, title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead"), wrapper: { class: 'col-md-9 qa-full-name rspec-full-name' }, help: s_("Profiles|Enter your name, so people you know can recognize you")
+ = form.text_field :name, class: 'gl-form-input form-control', required: true, title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead")
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Enter your name, so people you know can recognize you")
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml
index 8568e61aa33..bbbb8154c51 100644
--- a/app/views/profiles/accounts/show.html.haml
+++ b/app/views/profiles/accounts/show.html.haml
@@ -3,15 +3,15 @@
- if current_user.ldap_user?
= render Pajamas::AlertComponent.new(alert_class: 'gl-my-5',
- dismissible: false) do
- .gl-alert-body
+ dismissible: false) do |c|
+ = c.body do
= s_('Profiles|Some options are unavailable for LDAP accounts')
- if params[:two_factor_auth_enabled_successfully]
= render Pajamas::AlertComponent.new(variant: :success,
alert_class: 'gl-my-5',
- close_button_class: 'js-close-2fa-enabled-success-alert') do
- .gl-alert-body
+ close_button_class: 'js-close-2fa-enabled-success-alert') do |c|
+ = c.body do
= html_escape(_('You have set up 2FA for your account! If you lose access to your 2FA device, you can use your recovery codes to access your account. Alternatively, if you upload an SSH key, you can %{anchorOpen}use that key to generate additional recovery codes%{anchorClose}.')) % { anchorOpen: '<a href="%{href}">'.html_safe % { href: help_page_path('user/profile/account/two_factor_authentication', anchor: 'generate-new-recovery-codes-using-ssh') }, anchorClose: '</a>'.html_safe }
.row.gl-mt-3.js-search-settings-section
diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml
index 5d74bbe9971..26c9b2f0ee1 100644
--- a/app/views/profiles/notifications/show.html.haml
+++ b/app/views/profiles/notifications/show.html.haml
@@ -3,8 +3,8 @@
%div
- if @user.errors.any?
- = render Pajamas::AlertComponent.new(variant: :danger) do
- .gl-alert-body
+ = render Pajamas::AlertComponent.new(variant: :danger) do |c|
+ = c.body do
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml
index 3fb48f3d3e3..8c799a5e3fe 100644
--- a/app/views/profiles/preferences/show.html.haml
+++ b/app/views/profiles/preferences/show.html.haml
@@ -127,7 +127,12 @@
= _('Language')
= f.select :preferred_language, language_choices, {}, class: 'select2'
.form-text.text-muted
- = s_('Preferences|This feature is experimental and translations are not complete yet')
+ = s_('Preferences|This feature is experimental and translations are not yet complete.')
+ %p
+ = link_to help_page_url('development/i18n/translation'), class: 'text-nowrap', target: '_blank', rel: 'noopener noreferrer' do
+ = _("Help translate GitLab into your language")
+ %span{ aria: { label: _('Open new window') } }
+ = sprite_icon('external-link')
.form-group
= f.label :first_day_of_week, class: 'label-bold' do
= _('First day of the week')
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 531e72b7cc2..107c7cebc61 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -5,7 +5,7 @@
- availability = availability_values
- custom_emoji = show_status_emoji?(@user.status)
-= bootstrap_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user gl-mt-3 js-quick-submit gl-show-field-errors js-password-prompt-form', remote: true }, authenticity_token: true do |f|
+= gitlab_ui_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user gl-mt-3 js-quick-submit gl-show-field-errors js-password-prompt-form', remote: true }, authenticity_token: true do |f|
= form_errors(@user)
.row.js-search-settings-section
@@ -34,7 +34,7 @@
.gl-my-3
%button.gl-button.btn.btn-default.js-choose-user-avatar-button{ type: 'button' }= s_("Profiles|Choose file...")
%span.avatar-file-name.gl-ml-3.js-avatar-filename= s_("Profiles|No file chosen.")
- = f.file_field_without_bootstrap :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
+ = f.file_field :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
.gl-text-gray-500= s_("Profiles|The maximum file size allowed is 200KB.")
- if @user.avatar?
= link_to s_("Profiles|Remove avatar"), profile_avatar_path, data: { confirm: s_("Profiles|Avatar will be removed. Are you sure?") }, method: :delete, class: 'gl-button btn btn-danger-secondary btn-sm gl-mt-5'
@@ -62,16 +62,24 @@
= sprite_icon("close")
= status_form.hidden_field :emoji, id: 'js-status-emoji-field'
- = status_form.text_field :message,
- id: 'js-status-message-field',
- class: 'form-control gl-form-input input-lg',
- label: s_("Profiles|Your status"),
- prepend: emoji_button,
- append: reset_message_button,
- placeholder: s_("Profiles|What's your status?")
- .checkbox-icon-inline-wrapper
- = status_form.check_box :availability, { data: { testid: "user-availability-checkbox" }, label: s_("Profiles|Busy"), wrapper_class: 'gl-mr-0 gl-font-weight-bold' }, availability["busy"], availability["not_set"]
- .gl-text-gray-600.gl-ml-5= s_('Profiles|An indicator appears next to your name and avatar')
+ .form-group.gl-form-group
+ = status_form.label :message, s_("Profiles|Your status")
+ .input-group{ role: 'group' }
+ .input-group-prepend
+ = emoji_button
+ = status_form.text_field :message,
+ id: 'js-status-message-field',
+ class: 'form-control gl-form-input input-lg',
+ placeholder: s_("Profiles|What's your status?")
+ .input-group-append
+ = reset_message_button
+ .form-group.gl-form-group
+ = status_form.gitlab_ui_checkbox_component :availability,
+ s_("Profiles|Busy"),
+ help_text: s_('Profiles|An indicator appears next to your name and avatar'),
+ checkbox_options: { data: { testid: "user-availability-checkbox" } },
+ checked_value: availability["busy"],
+ unchecked_value: availability["not_set"]
.col-lg-12
%hr
.row.user-time-preferences.js-search-settings-section
@@ -94,35 +102,71 @@
= s_("Profiles|Some options are unavailable for LDAP accounts")
.col-lg-8
.row
- = render 'profiles/name', form: f, user: @user
- = f.text_field :id, class: 'gl-form-input', readonly: true, label: s_('Profiles|User ID'), wrapper: { class: 'col-md-3' }
-
- = f.text_field :pronouns, label: s_('Profiles|Pronouns'), class: 'input-md gl-form-input', help: s_("Profiles|Enter your pronouns to let people know how to refer to you")
- = f.text_field :pronunciation, label: s_('Profiles|Pronunciation'), class: 'input-md gl-form-input', help: s_("Profiles|Enter how your name is pronounced to help people address you correctly")
+ .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')
+ = f.text_field :pronouns, class: 'gl-form-input form-control gl-form-input-lg'
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Enter your pronouns to let people know how to refer to you")
+ .form-group.gl-form-group
+ = f.label :pronunciation, s_('Profiles|Pronunciation')
+ = f.text_field :pronunciation, class: 'gl-form-input form-control gl-form-input-lg'
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Enter how your name is pronounced to help people address you correctly")
= render_if_exists 'profiles/extra_settings', form: f
= render_if_exists 'profiles/email_settings', form: f
- = f.text_field :skype, class: 'input-md gl-form-input', placeholder: s_("Profiles|username")
- = f.text_field :linkedin, class: 'input-md gl-form-input', help: s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename")
- = f.text_field :twitter, class: 'input-md gl-form-input', placeholder: s_("Profiles|@username")
- = f.text_field :website_url, label: s_('Profiles|Website url'), class: 'input-lg gl-form-input', placeholder: s_("Profiles|https://website.com")
- - if @user.read_only_attribute?(:location)
- = f.text_field :location, class: 'gl-form-input', readonly: true, help: s_("Profiles|Your location was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:location) }
- - else
- = f.text_field :location, label: s_('Profiles|Location'), class: 'input-lg gl-form-input', placeholder: s_("Profiles|City, country")
- = f.text_field :job_title, label: s_('Profiles|Job title'), class: 'input-md gl-form-input'
- = f.text_field :organization, label: s_('Profiles|Organization'), class: 'input-md gl-form-input', help: s_("Profiles|Who you represent or work for")
- = f.text_area :bio, class: 'gl-form-input', label: s_('Profiles|Bio'), rows: 4, maxlength: 250, help: s_("Profiles|Tell us about yourself in fewer than 250 characters")
+ .form-group.gl-form-group
+ = f.label :skype
+ = f.text_field :skype, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|username")
+ .form-group.gl-form-group
+ = f.label :linkedin
+ = f.text_field :linkedin, class: 'gl-form-input form-control gl-form-input-lg'
+ %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
+ = f.text_field :twitter, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|@username")
+ .form-group.gl-form-group
+ = f.label :website_url, s_('Profiles|Website url')
+ = f.text_field :website_url, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|https://website.com")
+ .form-group.gl-form-group
+ = f.label :location, s_('Profiles|Location')
+ - if @user.read_only_attribute?(:location)
+ = f.text_field :location, class: 'gl-form-input form-control gl-form-input-lg', readonly: true
+ %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
+ = f.text_field :location, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|City, country")
+ .form-group.gl-form-group
+ = f.label :job_title, s_('Profiles|Job title')
+ = f.text_field :job_title, class: 'gl-form-input form-control gl-form-input-lg'
+ .form-group.gl-form-group
+ = f.label :organization, s_('Profiles|Organization')
+ = f.text_field :organization, class: 'gl-form-input form-control gl-form-input-lg'
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Who you represent or work for")
+ .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
+ = s_("Profiles|Tell us about yourself in fewer than 250 characters")
%hr
- %h5= _('Private profile')
- .checkbox-icon-inline-wrapper
- - private_profile_label = capture do
- = s_("Profiles|Don't display activity-related personal information on your profile")
- = f.check_box :private_profile, label: private_profile_label, inline: true, wrapper_class: 'mr-0'
- = link_to sprite_icon('question-o'), help_page_path('user/profile/index.md', anchor: 'make-your-user-profile-page-private')
- %h5= s_("Profiles|Private contributions")
- = f.check_box :include_private_contributions, label: s_('Profiles|Include private contributions on my profile'), wrapper_class: 'mb-2', inline: true
- .help-block
- = s_("Profiles|Choose to show contributions of private projects on your public profile without any project, repository or organization information")
+ %fieldset.form-group.gl-form-group
+ %legend.col-form-label.col-form-label
+ = _('Private profile')
+ - private_profile_label = s_("Profiles|Don't display activity-related personal information on your profile")
+ - 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'),
+ help_text: s_("Profiles|Choose to show contributions of private projects on your public profile without any project, repository or organization information")
%hr
= f.submit s_("Profiles|Update profile settings"), class: 'gl-button btn btn-confirm gl-mr-3 js-password-prompt-btn'
= link_to _("Cancel"), user_path(current_user), class: 'gl-button btn btn-default btn-cancel'
diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml
index 3ae64643420..ace644a493b 100644
--- a/app/views/profiles/two_factor_auths/show.html.haml
+++ b/app/views/profiles/two_factor_auths/show.html.haml
@@ -2,7 +2,7 @@
- page_title _('Two-Factor Authentication'), _('Account')
- add_to_breadcrumbs _('Account'), profile_account_path
- @content_class = "limit-container-width" unless fluid_layout
-- webauthn_enabled = Feature.enabled?(:webauthn, default_enabled: :yaml)
+- webauthn_enabled = Feature.enabled?(:webauthn)
.js-two-factor-auth{ 'data-two-factor-skippable' => "#{two_factor_skippable?}", 'data-two_factor_skip_url' => skip_profile_two_factor_auth_path }
.row.gl-mt-3
@@ -42,8 +42,8 @@
- if @error
= render Pajamas::AlertComponent.new(title: @error[:message],
variant: :danger,
- dismissible: false) do
- .gl-alert-body
+ dismissible: false) do |c|
+ = c.body do
= link_to _('Try the troubleshooting steps here.'), help_page_path('user/profile/account/two_factor_authentication.md', anchor: 'troubleshooting'), target: '_blank', rel: 'noopener noreferrer'
.form-group