mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'ent-3786-evitar-cambio-tipo-modulo-politicas' into 'develop'
Modified control for module edition See merge request artica/pandorafms!2563
This commit is contained in:
commit
5f3684fb4e
@ -141,7 +141,9 @@ $largeClassDisabledBecauseInPolicy = '';
|
|||||||
|
|
||||||
$page = get_parameter('page', '');
|
$page = get_parameter('page', '');
|
||||||
|
|
||||||
if (strstr($page, 'policy_modules') === false && $id_agent_module) {
|
$in_policies_page = strstr($page, 'policy_modules');
|
||||||
|
|
||||||
|
if ($in_policies_page === false && $id_agent_module) {
|
||||||
if ($config['enterprise_installed']) {
|
if ($config['enterprise_installed']) {
|
||||||
if (policies_is_module_linked($id_agent_module) == 1) {
|
if (policies_is_module_linked($id_agent_module) == 1) {
|
||||||
$disabledBecauseInPolicy = 1;
|
$disabledBecauseInPolicy = 1;
|
||||||
@ -250,6 +252,12 @@ $table_simple->data[0][3] .= html_print_select_from_sql(
|
|||||||
$disabledBecauseInPolicy
|
$disabledBecauseInPolicy
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ((isset($id_agent_module) && $id_agent_module) || $id_policy_module != 0) {
|
||||||
|
$edit = false;
|
||||||
|
} else {
|
||||||
|
$edit = true;
|
||||||
|
}
|
||||||
|
|
||||||
$in_policy = strstr($page, 'policy_modules');
|
$in_policy = strstr($page, 'policy_modules');
|
||||||
if (!$in_policy) {
|
if (!$in_policy) {
|
||||||
// Cannot select the current module to be itself parent
|
// Cannot select the current module to be itself parent
|
||||||
@ -280,17 +288,6 @@ if (!$in_policy) {
|
|||||||
$table_simple->data[2][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help');
|
$table_simple->data[2][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help');
|
||||||
$table_simple->data[2][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true);
|
$table_simple->data[2][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true);
|
||||||
|
|
||||||
if (isset($id_agent_module)) {
|
|
||||||
if ($id_agent_module) {
|
|
||||||
$edit = false;
|
|
||||||
} else {
|
|
||||||
$edit = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Run into a policy
|
|
||||||
$edit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$edit) {
|
if (!$edit) {
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT id_tipo, nombre
|
'SELECT id_tipo, nombre
|
||||||
|
Loading…
x
Reference in New Issue
Block a user