From 3259795a0bf70969e4b476398e8dd6375850d629 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 27 Feb 2023 16:15:34 +0100 Subject: [PATCH] #10559 control delete task list if not exist id --- .../wizards/DiscoveryTaskList.class.php | 59 +++++++++++-------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index a1fa53ced3..44f8ebf868 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -955,29 +955,42 @@ class DiscoveryTaskList extends HTML ) ) { if ($ipam === true) { - $data[9] .= ''.html_print_image( - 'images/config.png', - true, - [ - 'title' => __('Edit task'), - 'class' => 'invert_filter', - ] - ).''; - $data[9] .= ''.html_print_image( - 'images/cross.png', - true, - [ - 'title' => __('Delete task'), - 'class' => 'invert_filter', - ] - ).''; + if (empty($tipam_task_id) === false) { + $data[9] .= ''.html_print_image( + 'images/config.png', + true, + [ + 'title' => __('Edit task'), + 'class' => 'invert_filter', + ] + ).''; + $data[9] .= ''.html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete task'), + 'class' => 'invert_filter', + ] + ).''; + } else { + $data[9] .= ''.html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete task'), + 'class' => 'invert_filter', + ] + ).''; + } } else { // Check if is a H&D, Cloud or Application or IPAM. $data[9] .= '