From c3f66afc9c2380e149d9e316c9e08a60066dc31a Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Wed, 29 Feb 2012 15:45:21 +0000 Subject: [PATCH] 2012-02-29 Juan Manuel Ramon * godmode/agentes/module_manager_editor_common.php: Export server select is disabled in module policy editor and in standard module edition can be modified when a policy module is edited. Fixes: #3495682 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5677 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ .../godmode/agentes/module_manager_editor_common.php | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e5f5717897..91b979378a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2012-02-29 Juan Manuel Ramon + + * godmode/agentes/module_manager_editor_common.php: Export server + select is disabled in module policy editor and in standard module + edition can be modified when a policy module is edited. + + Fixes: #3495682 + 2012-02-28 Juan Manuel Ramon * include/javascript/pandora_modules.js: "snmpwalk" button is diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index d4795ba010..ec0fde1c67 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -242,9 +242,17 @@ $table_advanced->data[3][1] = html_print_input_text ('min', $min, '', 5, 15, tru $table_advanced->data[3][2] = __('Max. Value'); $table_advanced->data[3][3] = html_print_input_text ('max', $max, '', 5, 15, true, $disabledBecauseInPolicy); -$table_advanced->data[4][0] = __('Export target'); +$table_advanced->data[4][0] = __('Export target'); +// Default text message for export target select and disabled option +$none_text = __('None'); +$disabled_export = false; +// If code comes from policies disable export select +if ($__code_from == 'policies'){ + $none_text = __('Not needed'); + $disabled_export = true; +} $table_advanced->data[4][1] = html_print_select_from_sql ('SELECT id, name FROM tserver_export ORDER BY name', - 'id_export', $id_export, '',__('None'),'0', true, false, false, $disabledBecauseInPolicy).ui_print_help_tip (__('In case you use an Export server you can link this module and export data to one these.'), true); + 'id_export', $id_export, '', $none_text, '0', true, false, false, $disabled_export).ui_print_help_tip (__('In case you use an Export server you can link this module and export data to one these.'), true); $table_advanced->colspan[4][1] = 3; $table_advanced->data[5][0] = __('Unit'); $table_advanced->data[5][1] = html_print_input_text ('unit', $unit,