From 4430a7b2fe83747e06418b40a6c8002177db23fa Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 5 Sep 2017 12:35:21 +0200 Subject: [PATCH] fixed errors in autocomplete field --- pandora_console/godmode/agentes/agent_manager.php | 1 + pandora_console/include/functions_ui.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index f3b8a76773..fd8c4492e8 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -263,6 +263,7 @@ $params['hidden_input_idagent_value'] = $id_parent; $params['value'] = db_get_value ("alias","tagente","id_agente",$id_parent); $params['selectbox_id'] = 'cascade_protection_module'; $params['javascript_is_function_select'] = true; +$params['cascade_protection'] = true; $table->data[3][1] = ui_print_agent_autocomplete_input($params); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 055cdaa351..de10fcaf91 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2951,6 +2951,11 @@ function ui_print_agent_autocomplete_input($parameters) { if (isset($parameters['from_wux'])) { $from_wux_transaction = $parameters['from_wux']; } + + $cascade_protection = false; //Default value + if (isset($parameters['cascade_protection'])) { + $cascade_protection = $parameters['cascade_protection']; + } $metaconsole_enabled = false; //Default value if (isset($parameters['metaconsole_enabled'])) { @@ -3149,7 +3154,9 @@ function ui_print_agent_autocomplete_input($parameters) { .append ($("") .attr("value", val["id_agente_modulo"]).text (s)); }); - + if('. (int)$cascade_protection .' == 0){ + $("#' . $selectbox_id . '").enable(); + } $("#' . $selectbox_id . '").fadeIn ("normal"); } });