From 8040c6923ee783ed781532c02dbadf3595f16816 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 3 Aug 2023 14:15:08 +0200 Subject: [PATCH] #11709 add confirm on delete cron task --- pandora_console/include/functions_cron.php | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index 0140c40c14..2eafd8dccb 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -923,17 +923,15 @@ function cron_list_table() } if ($manage_pandora) { - $data[7] .= ''; - $data[7] .= html_print_image( - 'images/delete.svg', - true, + $data[7] .= html_print_menu_button( [ - 'title' => __('Delete'), - 'class' => 'main_menu_icon invert_filter', - ] + 'href' => $url.'delete_task=1&id_user_task='.$task['id'], + 'image' => 'images/delete.svg', + 'title' => __('Delete'), + 'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;', + ], + true ); - $data[7] .= ''; } } else { if ($write_perms || $manage_pandora) { @@ -950,17 +948,15 @@ function cron_list_table() } if ($manage_perms || $manage_pandora) { - $data[7] .= ''; - $data[7] .= html_print_image( - 'images/delete.svg', - true, + $data[7] .= html_print_menu_button( [ - 'title' => __('Delete'), - 'class' => 'main_menu_icon invert_filter', - ] + 'href' => $url.'delete_task=1&id_user_task='.$task['id'], + 'image' => 'images/delete.svg', + 'title' => __('Delete'), + 'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;', + ], + true ); - $data[7] .= ''; } }