diff --git a/pandora_console/general/login_identification_wizard.php b/pandora_console/general/login_identification_wizard.php
index 30b801c9fa..9ee0cb199d 100644
--- a/pandora_console/general/login_identification_wizard.php
+++ b/pandora_console/general/login_identification_wizard.php
@@ -103,7 +103,7 @@ $display_forced = ($wizard_data['force_newsletter'] != -1) || ($wizard_data['for
// Return if it is fully completed
if ((!$display_register) && (!$display_newsletter)) return;
-$return_button = get_parameter ('return_button', 0);
+$return_button = get_parameter ('return_button', 0) == 1;
$email = db_get_value ('email', 'tusuario', 'id_user', $config['id_user']);
//Avoid to show default email
@@ -172,8 +172,6 @@ var display_newsletter = ;
var display_forced = ;
var return_button = ;
-
-console.log (display_forced + ".");
////////////////////////////////////////////////////////////////////////
//HELPER FUNCTIONS
@@ -198,6 +196,7 @@ function submit_open_wizard (register, newsletter, email, forced) {
//EVENT FUNCTIONS
$("#submit-return_dialog_button").click (function () {
$("#login_accept_register" ).dialog('close');
+ $("#all-required").hide();
$("#login_id_dialog" ).dialog('open');
});
@@ -217,7 +216,8 @@ $("#submit-finish_dialog_button").click (function () {
if (!register && display_register && !display_forced) {
$("#login_registration_yesno").dialog('open');
} else {
- submit_open_wizard (1, newsletter, email, display_forced);
+ var register_forced = register ? 1 : 0;
+ submit_open_wizard (register_forced, newsletter, email, display_forced);
$("#login_accept_register" ).dialog('close');
}
});
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index e4a22899cd..f3187aa7b0 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -1459,6 +1459,24 @@ function config_check () {
// At this first version I'm passing errors using session variables, because the error management
// is done by an AJAX request. Better solutions could be implemented in the future :-)
+ if (license_free() && users_is_admin($config['id_user'])) {
+
+ //Registration advice
+ if (!isset ($config['instance_registered']) || ($config['instance_registered'] != 1)) {
+ set_pandora_error_for_header(
+ __('Click HERE to init the registration process'),
+ __("This PandoraFMS instance is not registered"));
+ }
+
+ //Newsletter advice
+ $newsletter = db_get_value ('middlename', 'tusuario', 'id_user', $config['id_user']);
+ if ($newsletter != 1) {
+ set_pandora_error_for_header(
+ __('Click HERE to init the newsletter subscription process'),
+ __("Missing user in newsletter"));
+ }
+ }
+
// Check default password for "admin"
$is_admin = db_get_value('is_admin', 'tusuario', 'id_user', $config['id_user']);
if ($is_admin) {
@@ -1624,23 +1642,6 @@ function config_check () {
__('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'), __("Problems with disable functions in PHP.INI"));
}
- if (license_free() && users_is_admin($config['id_user'])) {
- //Newsletter advice
- $newsletter = db_get_value ('middlename', 'tusuario', 'id_user', $config['id_user']);
- if ($newsletter != 1) {
- set_pandora_error_for_header(
- __('Click HERE to init the newsletter subscription process'),
- __("Missing user in newsletter"));
- }
-
- //Registration advice
- if (!isset ($config['instance_registered']) || ($config['instance_registered'] != 1)) {
- set_pandora_error_for_header(
- __('Click HERE to init the registration process'),
- __("This PandoraFMS instance is not registered"));
- }
- }
-
}
function config_return_in_bytes($val) {