#11709 add confirm on delete cron task

This commit is contained in:
Jonathan 2023-08-03 14:15:08 +02:00
parent 1982b9a9d8
commit 8040c6923e
1 changed files with 14 additions and 18 deletions

View File

@ -923,17 +923,15 @@ function cron_list_table()
}
if ($manage_pandora) {
$data[7] .= '<a href="'.$url;
$data[7] .= 'delete_task=1&id_user_task='.$task['id'].'">';
$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] .= '</a>';
}
} else {
if ($write_perms || $manage_pandora) {
@ -950,17 +948,15 @@ function cron_list_table()
}
if ($manage_perms || $manage_pandora) {
$data[7] .= '<a href="'.$url;
$data[7] .= 'delete_task=1&id_user_task='.$task['id'].'">';
$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] .= '</a>';
}
}