rfe #2657696 Automatically copy generated password
This commit is contained in:
@@ -59,6 +59,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
thanks to Tomas Srnka - tomassrnka
|
thanks to Tomas Srnka - tomassrnka
|
||||||
+ patch #2745215 [edit] Multi-row change with "]" improved,
|
+ patch #2745215 [edit] Multi-row change with "]" improved,
|
||||||
thanks to Virsacer - virsacer
|
thanks to Virsacer - virsacer
|
||||||
|
+ rfe #2657696 Automatically copy generated password
|
||||||
|
|
||||||
3.1.5.0 (not yet released)
|
3.1.5.0 (not yet released)
|
||||||
- patch #2739001 [export] XML does not allow spaces in element names,
|
- patch #2739001 [export] XML does not allow spaces in element names,
|
||||||
|
@@ -71,8 +71,7 @@ function checkAddUser(the_form)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a new password, which may then be copied to the form
|
* Generate a new password and copy it to the password input areas
|
||||||
* with suggestPasswordCopy().
|
|
||||||
*
|
*
|
||||||
* @param string the form name
|
* @param string the form name
|
||||||
*
|
*
|
||||||
@@ -90,19 +89,7 @@ function suggestPassword() {
|
|||||||
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 ) )
|
||||||
}
|
}
|
||||||
return passwd.value;
|
document.getElementById('text_pma_pw').value = passwd.value;
|
||||||
}
|
document.getElementById('text_pma_pw2').value = 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;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -73,7 +73,6 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
|
|||||||
</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()" />
|
||||||
<input type="button" id="button_copy_password" value="<?php echo $strCopy; ?>" onclick="suggestPasswordCopy(this.form)" />
|
|
||||||
<input type="text" name="generated_pw" id="generated_pw" />
|
<input type="text" name="generated_pw" id="generated_pw" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@@ -784,7 +784,6 @@ function PMA_displayLoginInformationFields($mode = 'new')
|
|||||||
. '</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()" />' . "\n"
|
||||||
. ' <input type="button" id="button_copy_password" value="' . $GLOBALS['strCopy'] . '" onclick="suggestPasswordCopy(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