diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/assets/javascripts/pages/admin/users | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) | |
download | gitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/assets/javascripts/pages/admin/users')
-rw-r--r-- | app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue | 46 | ||||
-rw-r--r-- | app/assets/javascripts/pages/admin/users/components/user_operation_confirmation_modal.vue | 1 |
2 files changed, 22 insertions, 25 deletions
diff --git a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue index e09b8e1bdd5..9c303cc6445 100644 --- a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue +++ b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue @@ -1,6 +1,5 @@ <script> -import { escape } from 'lodash'; -import { GlModal, GlButton, GlFormInput } from '@gitlab/ui'; +import { GlModal, GlButton, GlFormInput, GlSprintf } from '@gitlab/ui'; import { s__, sprintf } from '~/locale'; export default { @@ -8,6 +7,7 @@ export default { GlModal, GlButton, GlFormInput, + GlSprintf, }, props: { title: { @@ -52,27 +52,6 @@ export default { modalTitle() { return sprintf(this.title, { username: this.username }); }, - text() { - return sprintf( - this.content, - { - username: `<strong>${escape(this.username)}</strong>`, - strong_start: '<strong>', - strong_end: '</strong>', - }, - false, - ); - }, - confirmationTextLabel() { - return sprintf( - s__('AdminUsers|To confirm, type %{username}'), - { - username: `<code>${escape(this.username)}</code>`, - }, - false, - ); - }, - secondaryButtonLabel() { return s__('AdminUsers|Block user'); }, @@ -107,8 +86,25 @@ export default { <template> <gl-modal ref="modal" modal-id="delete-user-modal" :title="modalTitle" kind="danger"> <template> - <p v-html="text"></p> - <p v-html="confirmationTextLabel"></p> + <p> + <gl-sprintf :message="content"> + <template #username> + <strong>{{ username }}</strong> + </template> + <template #strong="props"> + <strong>{{ props.content }}</strong> + </template> + </gl-sprintf> + </p> + + <p> + <gl-sprintf :message="s__('AdminUsers|To confirm, type %{username}')"> + <template #username> + <code>{{ username }}</code> + </template> + </gl-sprintf> + </p> + <form ref="form" :action="deleteUserUrl" method="post" @submit.prevent> <input ref="method" type="hidden" name="_method" value="delete" /> <input :value="csrfToken" type="hidden" name="authenticity_token" /> diff --git a/app/assets/javascripts/pages/admin/users/components/user_operation_confirmation_modal.vue b/app/assets/javascripts/pages/admin/users/components/user_operation_confirmation_modal.vue index 4c335cfb018..4ca6ce6f1c3 100644 --- a/app/assets/javascripts/pages/admin/users/components/user_operation_confirmation_modal.vue +++ b/app/assets/javascripts/pages/admin/users/components/user_operation_confirmation_modal.vue @@ -1,4 +1,5 @@ <script> +/* eslint-disable vue/no-v-html */ import { GlModal } from '@gitlab/ui'; import { sprintf } from '~/locale'; |