diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-02 18:08:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-02 18:08:28 +0000 |
commit | 888bb81daaf346356c1fdd84a60108417fe2e774 (patch) | |
tree | 72c8ebcd8362185afdc91ed1c16b5f300b2fdc7b /app/helpers/users_helper.rb | |
parent | e61f798b74e8e18fca7239fd01802182479bfcfc (diff) | |
download | gitlab-ce-888bb81daaf346356c1fdd84a60108417fe2e774.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r-- | app/helpers/users_helper.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 7154d498d77..2af932f8e8c 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -231,6 +231,34 @@ module UsersHelper } end + def confirm_user_data(user) + message = if user.unconfirmed_email.present? + _('This user has an unconfirmed email address (%{email}). You may force a confirmation.') % { email: user.unconfirmed_email } + else + _('This user has an unconfirmed email address. You may force a confirmation.') + end + + modal_attributes = Gitlab::Json.dump({ + title: s_('AdminUsers|Confirm user %{username}?') % { username: sanitize_name(user.name) }, + messageHtml: message, + actionPrimary: { + text: s_('AdminUsers|Confirm user'), + attributes: [{ variant: 'info', 'data-qa-selector': 'confirm_user_confirm_button' }] + }, + actionSecondary: { + text: _('Cancel'), + attributes: [{ variant: 'default' }] + } + }) + + { + path: confirm_admin_user_path(user), + method: 'put', + modal_attributes: modal_attributes, + qa_selector: 'confirm_user_button' + } + end + def user_deactivation_effects header = tag.p s_('AdminUsers|Deactivating a user has the following effects:') |