From 29703c708a334d7c96bf3ff9348ccce19b91ca75 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 28 Aug 2017 11:14:04 +0200 Subject: [PATCH] Disable autosubmit in agent module view - #1125 --- pandora_console/extensions/agents_alerts.php | 8 +++++--- pandora_console/extensions/agents_modules.php | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/extensions/agents_alerts.php b/pandora_console/extensions/agents_alerts.php index 97f1bc7589..f5cad20d74 100755 --- a/pandora_console/extensions/agents_alerts.php +++ b/pandora_console/extensions/agents_alerts.php @@ -546,9 +546,11 @@ ui_require_jquery_file('pandora'); }); $('#group_id').change(function(){ - var regx = /&group_id=\d*/g; - var url = location.href.replace(regx, ""); - location.href = url+"&group_id="+$("#group_id").val(); + if(location.href.indexOf("extensions/agents_modules") == -1){ + var regx = /&group_id=\d*/g; + var url = location.href.replace(regx, ""); + location.href = url+"&group_id="+$("#group_id").val(); + } }); }); diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index cb6fe8cd42..4a35c66374 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -70,7 +70,9 @@ function mainAgentsModules() { $offset = (int)get_parameter('offset', 0); $hor_offset = (int)get_parameter('hor_offset', 0); $block = $config['block_size']; - $agents_id = (array)get_parameter('id_agents2', -1); + if(get_parameter('modulegroup') != null){ + $agents_id = (array)get_parameter('id_agents2', -1); + } $selection_a_m = (int)get_parameter('selection_agent_module'); $modules_selected = (array)get_parameter('module', 0); $update_item = (string)get_parameter('edit_item','');