diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue b/app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue index 5bbe44b20b3..88890b3332d 100644 --- a/app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue +++ b/app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue @@ -1,5 +1,12 @@ <script> -import { GlAlert, GlModal, GlFormGroup, GlFormInput, GlSprintf } from '@gitlab/ui'; +import { + GlAlert, + GlModal, + GlFormGroup, + GlFormInput, + GlSafeHtmlDirective as SafeHtml, + GlSprintf, +} from '@gitlab/ui'; import { CONFIRM_DANGER_MODAL_BUTTON, CONFIRM_DANGER_MODAL_TITLE, @@ -17,13 +24,22 @@ export default { GlFormInput, GlSprintf, }, + directives: { + SafeHtml, + }, inject: { + htmlConfirmationMessage: { + default: false, + }, confirmDangerMessage: { default: '', }, confirmButtonText: { default: CONFIRM_DANGER_MODAL_BUTTON, }, + additionalInformation: { + default: CONFIRM_DANGER_WARNING, + }, }, props: { modalId: { @@ -81,9 +97,12 @@ export default { :dismissible="false" class="gl-mb-4" > - {{ confirmDangerMessage }} + <span v-if="htmlConfirmationMessage" v-safe-html="confirmDangerMessage"></span> + <span v-else> + {{ confirmDangerMessage }} + </span> </gl-alert> - <p data-testid="confirm-danger-warning">{{ $options.i18n.CONFIRM_DANGER_WARNING }}</p> + <p data-testid="confirm-danger-warning">{{ additionalInformation }}</p> <p data-testid="confirm-danger-phrase"> <gl-sprintf :message="$options.i18n.CONFIRM_DANGER_PHRASE_TEXT"> <template #phrase_code> |