From 707cba8edeea1ef7c473b4a8cf7d476202978039 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Mon, 3 Jan 2022 04:37:34 +0100 Subject: [PATCH] Pass proper sweetalert options for delete actions --- .../retrospring/features/inbox/delete.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/javascript/retrospring/features/inbox/delete.ts b/app/javascript/retrospring/features/inbox/delete.ts index eaae9ba1..1f4dff69 100644 --- a/app/javascript/retrospring/features/inbox/delete.ts +++ b/app/javascript/retrospring/features/inbox/delete.ts @@ -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;