Pass proper sweetalert options for delete actions
This commit is contained in:
parent
3ef2c15267
commit
707cba8ede
|
@ -32,12 +32,12 @@ export function deleteAllQuestionsHandler(event: Event): void {
|
||||||
swal({
|
swal({
|
||||||
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
|
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
|
||||||
text: I18n.translate('frontend.inbox.confirm_all.text'),
|
text: I18n.translate('frontend.inbox.confirm_all.text'),
|
||||||
icon: 'warning',
|
type: "warning",
|
||||||
dangerMode: true,
|
showCancelButton: true,
|
||||||
buttons: [
|
confirmButtonColor: "#DD6B55",
|
||||||
I18n.translate('views.actions.cancel'),
|
confirmButtonText: I18n.translate('views.actions.delete'),
|
||||||
I18n.translate('views.actions.delete')
|
cancelButtonText: I18n.translate('views.actions.cancel'),
|
||||||
]
|
closeOnConfirm: true
|
||||||
}, (returnValue) => {
|
}, (returnValue) => {
|
||||||
if (returnValue === null) return false;
|
if (returnValue === null) return false;
|
||||||
|
|
||||||
|
@ -66,12 +66,12 @@ export function deleteAllAuthorQuestionsHandler(event: Event): void {
|
||||||
swal({
|
swal({
|
||||||
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
|
title: I18n.translate('frontend.inbox.confirm_all.title', { count: count }),
|
||||||
text: I18n.translate('frontend.inbox.confirm_all.text'),
|
text: I18n.translate('frontend.inbox.confirm_all.text'),
|
||||||
icon: 'warning',
|
type: "warning",
|
||||||
dangerMode: true,
|
showCancelButton: true,
|
||||||
buttons: [
|
confirmButtonColor: "#DD6B55",
|
||||||
I18n.translate('views.actions.cancel'),
|
confirmButtonText: I18n.translate('views.actions.delete'),
|
||||||
I18n.translate('views.actions.delete')
|
cancelButtonText: I18n.translate('views.actions.cancel'),
|
||||||
]
|
closeOnConfirm: true
|
||||||
}, (returnValue) => {
|
}, (returnValue) => {
|
||||||
if (returnValue === null) return false;
|
if (returnValue === null) return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue