debian-mirror-gitlab/app/views/profiles/_email_settings.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
2.5 KiB
Text
Raw Normal View History

2019-07-07 11:18:12 +05:30
- form = local_assigns.fetch(:form)
- readonly = @user.read_only_attribute?(:email)
- email_change_disabled = local_assigns.fetch(:email_change_disabled, nil)
- read_only_help_text = readonly ? s_("Profiles|Your email address was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:email) } : user_email_help_text(@user)
- 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
2021-11-18 22:05:49 +05:30
- password_automatically_set = @user.password_automatically_set?
2019-07-07 11:18:12 +05:30
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= form.label :email, _('Email')
2022-07-23 23:45:48 +05:30
= form.text_field :email, required: true, class: 'gl-form-input form-control gl-md-form-input-lg', value: (@user.email unless @user.temp_oauth_email?), readonly: readonly || email_change_disabled
2022-07-16 23:28:13 +05:30
%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')
2022-07-23 23:45:48 +05:30
.gl-md-form-input-lg
2022-07-16 23:28:13 +05:30
= 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
2022-08-13 15:12:31 +05:30
= s_("Profiles|This email will be displayed on your public profile.")
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
2022-10-11 01:57:18 +05:30
- commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits')
- commit_email_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: commit_email_link_url }
2022-08-13 15:12:31 +05:30
- 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 }
2022-07-16 23:28:13 +05:30
= form.label :commit_email, s_('Profiles|Commit email')
2022-07-23 23:45:48 +05:30
.gl-md-form-input-lg
2022-07-16 23:28:13 +05:30
= 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