diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ce51e541f7..f9ba22e70e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-02-26 Miguel de Dios + + * general/login_page.php, include/javascript/jquery.pandora.js, + include/constants.php, index.php: fixed the dialog for the password + policies. And added constants. + + Fixes: #3605970 + 2013-02-26 Ramon Novoa * godmode/agentes/module_manager_editor_network.php: Always enable de @@ -20,7 +28,7 @@ include/functions_reporting.php: Improve the main page graphs and layout -2013-02-25 Miguel de Dios +2013-02-26 Miguel de Dios * include/functions_modules.php: fixed in function "modules_update_agent_module" the check disabled value. diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index c2cd93d3f4..f23fb1d9da 100644 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -244,6 +244,6 @@ ui_require_jquery_file('jquery-ui-1.10.0.custom'); }); }); - document.getElementById('nick').focus(); + $('#nick').focus(); /* ]]> */ \ No newline at end of file diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index ea1f47b198..bca50c6480 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -233,4 +233,9 @@ define ('MODULE_WEB', 7); /* SNMP CONSTANTS */ define ('SNMP_DIR_MIBS', "attachment/mibs"); + +/* PASSWORD POLICIES */ +define('PASSSWORD_POLICIES_OK', 0); +define('PASSSWORD_POLICIES_FIRST_CHANGE', 1); +define('PASSSWORD_POLICIES_EXPIRED', 2); ?> diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index 009c44e883..94a9847a19 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -47,7 +47,6 @@ $(document).ready (function () { opacity: 0.5, background: "black" }, - bgiframe: jQuery.browser.msie, width: 700, height: 300 }) @@ -96,8 +95,7 @@ $(document).ready (function () { overlay: { opacity: 0.5, background: "black" - }, - bgiframe: jQuery.browser.msie + } }); $("#submit-hide-license-error-msg").click (function () { @@ -123,13 +121,12 @@ $(document).ready (function () { .dialog ({ title: $("a#dialog_license_info").attr ("title"), resizable: false, - draggable: true, + draggable: true, modal: true, overlay: { opacity: 0.5, background: "black" }, - bgiframe: jQuery.browser.msie, width: 500, height: 190 }) @@ -151,14 +148,13 @@ $(document).ready (function () { overlay: { opacity: 0.5, background: "black" - }, - bgiframe: jQuery.browser.msie + } }); } if ($('#login_blocked').length) { - + $( "#login_blocked" ).dialog({ resizable: true, draggable: true, @@ -168,10 +164,9 @@ $(document).ready (function () { overlay: { opacity: 0.5, background: "black" - }, - bgiframe: jQuery.browser.msie + } }); - + } // Forced title code diff --git a/pandora_console/index.php b/pandora_console/index.php index 8805cb78f7..59f29848a1 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -211,8 +211,8 @@ elseif (! isset ($config['id_user']) && isset ($_GET["login"])) { $check_status = check_pass_status($nick, $pass); switch ($check_status) { - case 1: //first change - case 2: //pass expired + case PASSSWORD_POLICIES_FIRST_CHANGE: //first change + case PASSSWORD_POLICIES_EXPIRED: //pass expired $expired_pass = true; login_change_password($nick); break;