diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /app/views/profiles/_email_settings.html.haml | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'app/views/profiles/_email_settings.html.haml')
-rw-r--r-- | app/views/profiles/_email_settings.html.haml | 43 |
1 files changed, 31 insertions, 12 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 |