rfe #2657696 Automatically copy generated password

This commit is contained in:
Marc Delisle
2009-05-04 16:32:16 +00:00
parent 55a516e39c
commit 70c6e5a32c
4 changed files with 4 additions and 18 deletions

View File

@@ -59,6 +59,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
thanks to Tomas Srnka - tomassrnka
+ patch #2745215 [edit] Multi-row change with "]" improved,
thanks to Virsacer - virsacer
+ rfe #2657696 Automatically copy generated password
3.1.5.0 (not yet released)
- patch #2739001 [export] XML does not allow spaces in element names,

View File

@@ -71,8 +71,7 @@ function checkAddUser(the_form)
/**
* Generate a new password, which may then be copied to the form
* with suggestPasswordCopy().
* Generate a new password and copy it to the password input areas
*
* @param string the form name
*
@@ -90,19 +89,7 @@ function suggestPassword() {
for ( i = 0; i < passwordlength; i++ ) {
passwd.value += pwchars.charAt( Math.floor( Math.random() * pwchars.length ) )
}
return passwd.value;
}
/**
* Copy the generated password (or anything in the field) to the form
*
* @param string the form name
*
* @return boolean always true
*/
function suggestPasswordCopy() {
document.getElementById('text_pma_pw').value = document.getElementById('generated_pw').value;
document.getElementById('text_pma_pw2').value = document.getElementById('generated_pw').value;
document.getElementById('text_pma_pw').value = passwd.value;
document.getElementById('text_pma_pw2').value = passwd.value;
return true;
}

View File

@@ -73,7 +73,6 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
</td>
<td>
<input type="button" id="button_generate_password" value="<?php echo $strGenerate; ?>" onclick="suggestPassword()" />
<input type="button" id="button_copy_password" value="<?php echo $strCopy; ?>" onclick="suggestPasswordCopy(this.form)" />
<input type="text" name="generated_pw" id="generated_pw" />
</td>
</tr>

View File

@@ -784,7 +784,6 @@ function PMA_displayLoginInformationFields($mode = 'new')
. '</label>' . "\n"
. '<span class="options">' . "\n"
. ' <input type="button" id="button_generate_password" value="' . $GLOBALS['strGenerate'] . '" onclick="suggestPassword()" />' . "\n"
. ' <input type="button" id="button_copy_password" value="' . $GLOBALS['strCopy'] . '" onclick="suggestPasswordCopy(this.form)" />' . "\n"
. '</span>' . "\n"
. '<input type="text" name="generated_pw" id="generated_pw" />' . "\n"
. '</div>' . "\n"