2022-05-17 16:39:17 +08:00
|
|
|
<template>
|
2022-05-18 17:12:53 +08:00
|
|
|
<div ref="modal" @keydown.esc="cancel" class="modal" role="dialog" aria-hidden="true" tabindex="-1">
|
2022-05-17 16:39:17 +08:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
2023-08-17 19:55:17 +08:00
|
|
|
<i class="sn-icon sn-icon-close"></i>
|
2022-05-17 16:39:17 +08:00
|
|
|
</button>
|
|
|
|
<h2 class="modal-title">{{ i18n.t('assets.delete_file_modal.title') }}</h2>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<p v-html="i18n.t('assets.delete_file_modal.description_1_html', { file_name: fileName })"></p>
|
|
|
|
<p>{{ i18n.t('assets.delete_file_modal.description_2') }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2023-06-19 21:45:22 +08:00
|
|
|
<button type='button' class='btn btn-secondary' @click="cancel">
|
2022-05-17 16:39:17 +08:00
|
|
|
{{ i18n.t('general.cancel') }}
|
|
|
|
</button>
|
|
|
|
<button type='button' class='btn btn-danger' @click="confirm">
|
|
|
|
{{ i18n.t('assets.delete_file_modal.confirm_button') }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'deleteAttachmentModal',
|
|
|
|
props: {
|
|
|
|
fileName: String
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
$(this.$refs.modal).modal('show');
|
2022-06-22 00:20:52 +08:00
|
|
|
$(this.$refs.modal).on('hidden.bs.modal', () => {
|
|
|
|
this.$emit('cancel');
|
|
|
|
});
|
2022-05-17 16:39:17 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
confirm() {
|
|
|
|
$(this.$refs.modal).modal('hide');
|
|
|
|
this.$emit('confirm');
|
|
|
|
},
|
|
|
|
cancel() {
|
|
|
|
$(this.$refs.modal).modal('hide');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|