Merge branch '1190-Fallo-al-buscar-módulos-de-agente-en-protección-en-cascada-dev' into 'develop'

Fixed issue to search agent modules in cascade protection

See merge request !717
This commit is contained in:
vgilc 2017-08-18 13:05:01 +02:00
commit 7d1a7103ad
3 changed files with 5 additions and 7 deletions

View File

@ -580,11 +580,11 @@ ui_require_jquery_file('bgiframe');
});
$("#text-id_parent").on("autocompletechange", function () {
agent_name = $("#text-id_parent").val();
agent_id=$("#hidden-id_parent").val();
var params = {};
params["get_agent_modules_json_by_name"] = 1;
params["agent_name"] = agent_name;
params["id_agent"] = agent_id;
params["page"] = "include/ajax/module";
jQuery.ajax ({

View File

@ -558,11 +558,11 @@ $(document).ready (function () {
});
$("#text-id_parent").on("autocompletechange", function () {
agent_name = $("#text-id_parent").val();
agent_id = $("#hidden-id_parent").val();
var params = {};
params["get_agent_modules_json_by_name"] = 1;
params["agent_name"] = agent_name;
params["id_agent"] = agent_id;
params["page"] = "include/ajax/module";
jQuery.ajax ({

View File

@ -38,9 +38,7 @@ $get_agent_modules_json_by_name = (bool) get_parameter('get_agent_modules_json_b
if ($get_agent_modules_json_by_name) {
$agent_name = get_parameter('agent_name');
$agent_id = agents_get_agent_id($agent_name);
$agent_id = get_parameter('id_agent');
$agent_modules = db_get_all_rows_sql("SELECT id_agente_modulo as id_module, nombre as name FROM tagente_modulo
WHERE id_agente = " . $agent_id);