From 8e511a5088f84dcd7e9c4b48b468b6f85ec24dea Mon Sep 17 00:00:00 2001 From: vgilc Date: Tue, 2 Sep 2014 09:02:44 +0200 Subject: [PATCH] Ask for confirmation before deleting an alert. Ticket #1153. pandora_console/godmode/snmpconsole/snmp_alert.php --- pandora_console/godmode/snmpconsole/snmp_alert.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index 0a7fdde0b0..a112180f26 100644 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -997,7 +997,7 @@ else { foreach ($other_actions as $action) { $data[1] .= ''; $data[1] .= ''. alerts_get_alert_action_name ($action["alert_type"]).''; - $data[1] .= ' ' . + $data[1] .= ' ' . html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . ' '; $data[1] .= ''; } @@ -1026,7 +1026,7 @@ else { '' . html_print_image('images/add.png', true, array('title' => __("Add action"))) . '' . - '' . + '' . html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . ''; @@ -1233,6 +1233,13 @@ $(document).ready (function () { // Charge the fields of the action $("#alert_type").trigger('change'); + + $("#submit-delete_button").click (function () { + confirmation = confirm(""); + if (!confirmation) { + return; + } + }); });