mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Added policy agents exportation and importation. Ticket #4107
This commit is contained in:
parent
935b426a83
commit
8c7c1e6916
@ -68,8 +68,10 @@ function output_xml_resource($hook_enterprise) {
|
|||||||
output_xml_visual_console($id);
|
output_xml_visual_console($id);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ($hook_enterprise === true)
|
if ($hook_enterprise === true) {
|
||||||
return enterprise_output_xml_resource($type, $id);
|
$include_agents = get_parameter('include_agents', 0);
|
||||||
|
return enterprise_output_xml_resource($type, $id, $include_agents);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -330,7 +332,7 @@ function resource_exportation_extension_main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$hook_enterprise = enterprise_include ('extensions/resource_exportation/functions.php');
|
$hook_enterprise = enterprise_include ('extensions/resource_exportation/functions.php');
|
||||||
|
|
||||||
ui_print_page_header (__('Resource exportation'), "images/extensions.png", false, "", true, "" );
|
ui_print_page_header (__('Resource exportation'), "images/extensions.png", false, "", true, "" );
|
||||||
|
|
||||||
echo "<div class=notify>";
|
echo "<div class=notify>";
|
||||||
@ -362,8 +364,16 @@ function resource_exportation_extension_main() {
|
|||||||
function export_to_ptr(type) {
|
function export_to_ptr(type) {
|
||||||
id = $("select#" + type + " option:selected").val();
|
id = $("select#" + type + " option:selected").val();
|
||||||
url = location.href.split('index');
|
url = location.href.split('index');
|
||||||
url = url[0] + 'extensions/resource_exportation.php?get_ptr=1&type=' + type
|
if (type == "policy") {
|
||||||
+ '&id=' + id;
|
include_agents = $("#checkbox-export_agents").prop("checked")
|
||||||
|
|
||||||
|
url = url[0] + 'extensions/resource_exportation.php?get_ptr=1&type=' + type
|
||||||
|
+ '&id=' + id + '&include_agents=' + include_agents;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
url = url[0] + 'extensions/resource_exportation.php?get_ptr=1&type=' + type
|
||||||
|
+ '&id=' + id;
|
||||||
|
}
|
||||||
|
|
||||||
location.href=url;
|
location.href=url;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user