diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index bf334c25f3..ff04aa8970 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -261,6 +261,9 @@ $params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_name'] = 'id_agent_parent';
$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;
+
$table->data[3][1] = ui_print_agent_autocomplete_input($params);
$table->data[3][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). " " . ui_print_help_icon("cascade_protection", true);
@@ -579,37 +582,6 @@ ui_require_jquery_file('bgiframe');
}
});
- $("#text-id_parent").on("autocompletechange", function () {
- agent_id=$("#hidden-id_parent").val();
-
- var params = {};
- params["get_agent_modules_json_by_name"] = 1;
- params["id_agent"] = agent_id;
- params["page"] = "include/ajax/module";
-
- jQuery.ajax ({
- data: params,
- dataType: "json",
- type: "POST",
- url: "ajax.php",
- success: function (data) {
- $('#cascade_protection_module').empty();
- $('#cascade_protection_module')
- .append ($('')
- .html("Any")
- .prop("value", 0)
- .prop("selected", 'selected'));
- jQuery.each (data, function (i, val) {
- $('#cascade_protection_module')
- .append ($('')
- .html(val['name'])
- .prop("value", val['id_module'])
- .prop("selected", 'selected'));
- });
- }
- });
- });
-
paint_qrcode(
"data[0][1] = ui_print_agent_autocomplete_input($params);
$table->data[0][1] .= "" . __('Cascade protection'). " " .
@@ -566,38 +568,6 @@ $(document).ready (function () {
}
});
- $("#text-id_parent").on("autocompletechange", function () {
- agent_id = $("#hidden-id_parent").val();
-
- var params = {};
- params["get_agent_modules_json_by_name"] = 1;
- params["id_agent"] = agent_id;
- params["page"] = "include/ajax/module";
-
- jQuery.ajax ({
- data: params,
- dataType: "json",
- type: "POST",
- url: "ajax.php",
- success: function (data) {
- $('#cascade_protection_module').empty();
- $('#cascade_protection_module')
- .append ($('')
- .html("Any")
- .prop("value", 0)
- .prop("selected", 'selected'));
- jQuery.each (data, function (i, val) {
- $('#cascade_protection_module')
- .append ($('')
- .html(val['name'])
- .prop("value", val['id_module'])
- .prop("selected", 'selected'));
- });
- }
- });
- });
-
-
$("#form_agent").submit(function() {
var get_parameters_count = window.location.href.slice(
window.location.href.indexOf('?') + 1).split('&').length;
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 46a9556e4b..12f465de24 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -3118,7 +3118,6 @@ function ui_print_agent_autocomplete_input($parameters) {
.attr("value", val["id_agente_modulo"]).text (s));
});
- $("#' . $selectbox_id . '").enable();
$("#' . $selectbox_id . '").fadeIn ("normal");
}
});