From e2fb16cf63c4bad58d912e84ae9ececdc2f450bb Mon Sep 17 00:00:00 2001 From: fermin831 Date: Thu, 16 Jun 2016 13:27:19 +0200 Subject: [PATCH] Added unmerged changes from identification wizard feature --- .../update_manager/update_manager.setup.php | 14 +++++++++++++- pandora_console/index.php | 7 ++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/update_manager/update_manager.setup.php b/pandora_console/godmode/update_manager/update_manager.setup.php index 0b9f724e04..f9dbfc8466 100644 --- a/pandora_console/godmode/update_manager/update_manager.setup.php +++ b/pandora_console/godmode/update_manager/update_manager.setup.php @@ -24,6 +24,7 @@ if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_us return; } +$identification_reminder = get_parameter('identification_reminder', 1); $action_update_url_update_manager = (bool)get_parameter( 'action_update_url_update_manager', 0); @@ -50,6 +51,8 @@ if(!$action_update_url_update_manager){ if ($result) $result = config_update_value('update_manager_proxy_password', $update_manager_proxy_password); + if ($result && license_free()) + $result = config_update_value('identification_reminder',$identification_reminder); ui_print_result_message($result, __('Succesful Update the url config vars.'), @@ -78,7 +81,8 @@ if(!$action_update_url_update_manager){ if ($result) $result = config_update_value('update_manager_proxy_password', $update_manager_proxy_password); - + if ($result && license_free()) + $result = config_update_value('identification_reminder',$identification_reminder); ui_print_result_message($result, __('Succesful Update the url config vars.'), __('Unsuccesful Update the url config vars.')); @@ -113,6 +117,14 @@ $table->data[4][0] = __('Proxy password:'); $table->data[4][1] = html_print_input_password('update_manager_proxy_password', $update_manager_proxy_password, __('Proxy password'), 40, 60, true); +if (license_free()) { + $config["identification_reminder"] = isset($config["identification_reminder"]) ? $config["identification_reminder"] : 1; + $table->data[6][0] = __('Pandora FMS community reminder') . + ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this Pandora instance'), true); + $table->data[6][1] = __('Yes').'   '.html_print_radio_button ('identification_reminder', 1, '', $config["identification_reminder"], true).'  '; + $table->data[6][1] .= __('No').'   '.html_print_radio_button ('identification_reminder', 0, '', $config["identification_reminder"], true); +} + html_print_input_hidden('action_update_url_update_manager', 1); html_print_table($table); diff --git a/pandora_console/index.php b/pandora_console/index.php index ed80f692e9..5897f19f31 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -635,9 +635,10 @@ if (get_parameter ('login', 0) !== 0) { $display_previous_popup = include_once("general/last_message.php"); } } - if (!isset($config['skip_login_help_dialog']) || - $config['skip_login_help_dialog'] == 0) { - + if ((!isset($config['skip_login_help_dialog']) || $config['skip_login_help_dialog'] == 0) && + $display_previous_popup === false && + $config['initial_wizard'] == 1) { + include_once("general/login_help_dialog.php"); }