From d8a7ebea08b13628305ac4ad5ce279f7e415cd3b Mon Sep 17 00:00:00 2001 From: fermin831 Date: Mon, 22 Oct 2018 16:26:58 +0200 Subject: [PATCH] Only change the group to all grupo if neccesary when command is changed --- pandora_console/godmode/alerts/configure_alert_action.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 88b72e4f8b..49ca26db5b 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -284,14 +284,16 @@ $(document).ready (function () { // Change the selected group $("#group option").each(function(index, value) { - var current_group = $(value).val() + var current_group = $(value).val(); if (data.id_group != 0 && current_group != 0 && current_group != data.id_group) { $(value).hide(); } else { $(value).show(); } }); - $("#group").val(0); + if (data.id_group != 0 && $("#group").val() != data.id_group) { + $("#group").val(0); + } for (i = 1; i <= max_fields; i++) { var old_value = '';