diff --git a/ChangeLog b/ChangeLog index 43d318484..42404637d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -85,6 +85,8 @@ $Id$ - patch #2999595, rfe #2998130 [interface] Cleanup navigation frame. - patch #3025161 [core] Prevent sending of unnecessary cookies, thanks to Piotr Przybylski - crackpl +- bug [password] Generate password only available if JS is enabled + (fixed for Privileges and Change password) 3.3.6.0 (not yet released) diff --git a/js/messages.php b/js/messages.php index 8eb745ac1..aeb93f56c 100644 --- a/js/messages.php +++ b/js/messages.php @@ -62,6 +62,10 @@ $js_messages['strSelectForeignKey'] = __('Select Foreign Key'); $js_messages['strPleaseSelectPrimaryOrUniqueKey'] = __('Please select the primary key or a unique key'); $js_messages['strChangeDisplay'] = __('Choose column to display'); +/* password generation */ +$js_messages['strGeneratePassword'] = __('Generate password'); +$js_messages['strGenerate'] = __('Generate'); + echo "var PMA_messages = new Array();\n"; foreach ($js_messages as $name => $js_message) { PMA_printJsValue("PMA_messages['" . $name . "']", $js_message); diff --git a/js/password_generation.js b/js/password_generation.js new file mode 100644 index 000000000..9153cc9b5 --- /dev/null +++ b/js/password_generation.js @@ -0,0 +1,10 @@ +/* vim: set expandtab sw=4 ts=4 sts=4: */ +/** + * for libraries/display_change_password.lib.php + * + */ + +$(document).ready(function() { + $('#tr_element_before_generate_password').parent().append('' + PMA_messages['strGeneratePassword'] + ''); + $('#div_element_before_generate_password').parent().append('
'); +}); diff --git a/libraries/display_change_password.lib.php b/libraries/display_change_password.lib.php index b541aa528..1e88a4a41 100644 --- a/libraries/display_change_password.lib.php +++ b/libraries/display_change_password.lib.php @@ -58,7 +58,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) - +   @@ -67,15 +67,6 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) - - - - - - - - - ' . "\n"; } // end of the 'PMA_displayUserAndHostFields()' function diff --git a/user_password.php b/user_password.php index 9bfa280d0..91cfde006 100644 --- a/user_password.php +++ b/user_password.php @@ -42,6 +42,9 @@ if (! defined('PMA_NO_VARIABLES_IMPORT')) { */ require_once './libraries/common.inc.php'; +$GLOBALS['js_include'][] = 'server_privileges.js'; +$GLOBALS['js_include'][] = 'password_generation.js'; + /** * Displays an error message and exits if the user isn't allowed to use this * script @@ -124,8 +127,8 @@ if (isset($_REQUEST['nopass'])) { * aren't valid -> displays the form */ // Loads the headers -$GLOBALS['js_include'][] = 'server_privileges.js'; require_once './libraries/header.inc.php'; + echo '

' . __('Change password') . '

' . "\n\n"; // Displays an error message if required