Pass proper sweetalert options for delete actions

This commit is contained in:
Andreas Nedbal 2022-01-03 04:37:34 +01:00 committed by Andreas Nedbal
parent 3ef2c15267
commit 707cba8ede
1 changed files with 12 additions and 12 deletions

View File

@ -32,12 +32,12 @@ export function deleteAllQuestionsHandler(event: Event): void {
swal({
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
text: I18n.translate('frontend.inbox.confirm_all.text'),
icon: 'warning',
dangerMode: true,
buttons: [
I18n.translate('views.actions.cancel'),
I18n.translate('views.actions.delete')
]
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: I18n.translate('views.actions.delete'),
cancelButtonText: I18n.translate('views.actions.cancel'),
closeOnConfirm: true
}, (returnValue) => {
if (returnValue === null) return false;
@ -66,12 +66,12 @@ export function deleteAllAuthorQuestionsHandler(event: Event): void {
swal({
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
text: I18n.translate('frontend.inbox.confirm_all.text'),
icon: 'warning',
dangerMode: true,
buttons: [
I18n.translate('views.actions.cancel'),
I18n.translate('views.actions.delete')
]
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: I18n.translate('views.actions.delete'),
cancelButtonText: I18n.translate('views.actions.cancel'),
closeOnConfirm: true
}, (returnValue) => {
if (returnValue === null) return false;