bug [gui] Generate Password not working for 'Change Login Information', only for 'Change password'
This commit is contained in:
@@ -18,6 +18,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
thanks to Geoffray Warnants - amnsk
|
thanks to Geoffray Warnants - amnsk
|
||||||
+ patch #2798592 [import] Progress bar,
|
+ patch #2798592 [import] Progress bar,
|
||||||
thanks to Tomas Srnka - tomassrnka
|
thanks to Tomas Srnka - tomassrnka
|
||||||
|
- bug [gui] Generate Password not working for 'Change Login Information', only for 'Change password'
|
||||||
|
|
||||||
3.2.1.0 (not yet released)
|
3.2.1.0 (not yet released)
|
||||||
- bug #2799009 Login with ipv6 IP address breaks redirect
|
- bug #2799009 Login with ipv6 IP address breaks redirect
|
||||||
|
@@ -73,23 +73,23 @@ function checkAddUser(the_form)
|
|||||||
/**
|
/**
|
||||||
* Generate a new password and copy it to the password input areas
|
* Generate a new password and copy it to the password input areas
|
||||||
*
|
*
|
||||||
* @param string the form name
|
* @param object the form that holds the password fields
|
||||||
*
|
*
|
||||||
* @return boolean always true
|
* @return boolean always true
|
||||||
*/
|
*/
|
||||||
function suggestPassword() {
|
function suggestPassword(passwd_form) {
|
||||||
// restrict the password to just letters and numbers to avoid problems:
|
// restrict the password to just letters and numbers to avoid problems:
|
||||||
// "editors and viewers regard the password as multiple words and
|
// "editors and viewers regard the password as multiple words and
|
||||||
// things like double click no longer work"
|
// things like double click no longer work"
|
||||||
var pwchars = "abcdefhjmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWYXZ";
|
var pwchars = "abcdefhjmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWYXZ";
|
||||||
var passwordlength = 16; // do we want that to be dynamic? no, keep it simple :)
|
var passwordlength = 16; // do we want that to be dynamic? no, keep it simple :)
|
||||||
var passwd = document.getElementById('generated_pw');
|
var passwd = passwd_form.generated_pw;
|
||||||
passwd.value = '';
|
passwd.value = '';
|
||||||
|
|
||||||
for ( i = 0; i < passwordlength; i++ ) {
|
for ( i = 0; i < passwordlength; i++ ) {
|
||||||
passwd.value += pwchars.charAt( Math.floor( Math.random() * pwchars.length ) )
|
passwd.value += pwchars.charAt( Math.floor( Math.random() * pwchars.length ) )
|
||||||
}
|
}
|
||||||
document.getElementById('text_pma_pw').value = passwd.value;
|
passwd_form.text_pma_pw.value = passwd.value;
|
||||||
document.getElementById('text_pma_pw2').value = passwd.value;
|
passwd_form.text_pma_pw2.value = passwd.value;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -72,7 +72,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
|
|||||||
<?php echo $strGeneratePassword; ?>
|
<?php echo $strGeneratePassword; ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="button" id="button_generate_password" value="<?php echo $strGenerate; ?>" onclick="suggestPassword()" />
|
<input type="button" id="button_generate_password" value="<?php echo $strGenerate; ?>" onclick="suggestPassword(this.form)" />
|
||||||
<input type="text" name="generated_pw" id="generated_pw" />
|
<input type="text" name="generated_pw" id="generated_pw" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@@ -783,7 +783,7 @@ function PMA_displayLoginInformationFields($mode = 'new')
|
|||||||
. ' ' . $GLOBALS['strGeneratePassword'] . ':' . "\n"
|
. ' ' . $GLOBALS['strGeneratePassword'] . ':' . "\n"
|
||||||
. '</label>' . "\n"
|
. '</label>' . "\n"
|
||||||
. '<span class="options">' . "\n"
|
. '<span class="options">' . "\n"
|
||||||
. ' <input type="button" id="button_generate_password" value="' . $GLOBALS['strGenerate'] . '" onclick="suggestPassword()" />' . "\n"
|
. ' <input type="button" id="button_generate_password" value="' . $GLOBALS['strGenerate'] . '" onclick="suggestPassword(this.form)" />' . "\n"
|
||||||
. '</span>' . "\n"
|
. '</span>' . "\n"
|
||||||
. '<input type="text" name="generated_pw" id="generated_pw" />' . "\n"
|
. '<input type="text" name="generated_pw" id="generated_pw" />' . "\n"
|
||||||
. '</div>' . "\n"
|
. '</div>' . "\n"
|
||||||
|
Reference in New Issue
Block a user