Fixed the js bugs with the MSIE autocomplete feature
This commit is contained in:
@@ -23,6 +23,8 @@ $Source$
|
||||
* header.inc.php3, lines 138-143; tbl_change.php3; libraries/tbl_change.js:
|
||||
improved js controls for null/not null fields and fixed js bugs with the
|
||||
MSIE autocomplete feature.
|
||||
* user_details.php3; user_password.php3: fixed the js bugs with the MSIE
|
||||
autocomplete feature.
|
||||
|
||||
2002-03-20 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/*, removed $strSequence
|
||||
|
@@ -383,7 +383,7 @@ function PMA_normalOperations()
|
||||
<?php echo $GLOBALS['strHost']; ?> :
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="host" size="10" onchange="this.form.anyhost[1].checked = true" />
|
||||
<input type="text" name="host" size="10" <?php echo $GLOBALS['chg_evt_handler']; ?>="this.form.anyhost[1].checked = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -397,12 +397,12 @@ function PMA_normalOperations()
|
||||
<?php echo $GLOBALS['strUserName']; ?> :
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="pma_user" size="10" onchange="this.form.anyuser[1].checked = true" />
|
||||
<input type="text" name="pma_user" size="10" <?php echo $GLOBALS['chg_evt_handler']; ?>="this.form.anyuser[1].checked = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" name="nopass" value="1" onclick="pma_pw.value = ''; pma_pw2.value = ''" />
|
||||
<input type="radio" name="nopass" value="1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true" />
|
||||
<?php echo $GLOBALS['strNoPassword'] . "\n"; ?>
|
||||
</td>
|
||||
<td> </td>
|
||||
@@ -411,10 +411,10 @@ function PMA_normalOperations()
|
||||
<?php echo $GLOBALS['strPassword']; ?> :
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="pma_pw" size="10" onchange="nopass[1].checked = true" />
|
||||
<input type="password" name="pma_pw" size="10" <?php echo $GLOBALS['chg_evt_handler']; ?>="nopass[1].checked = true" />
|
||||
|
||||
<?php echo $GLOBALS['strReType']; ?> :
|
||||
<input type="password" name="pma_pw2" size="10" onchange="nopass[1].checked = true" />
|
||||
<input type="password" name="pma_pw2" size="10" <?php echo $GLOBALS['chg_evt_handler']; ?>="nopass[1].checked = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -606,7 +606,7 @@ function PMA_grantOperations($grants)
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<?php echo $GLOBALS['strDatabaseWildcard'] . "\n"; ?>
|
||||
<input type="text" name="newdb" value="<?php echo ((!$is_selected_db && !empty($pma_user)) ? $pma_user . '%' : ''); ?>" onchange="change(this)" />
|
||||
<input type="text" name="newdb" value="<?php echo ((!$is_selected_db && !empty($pma_user)) ? $pma_user . '%' : ''); ?>" <?php echo $GLOBALS['chg_evt_handler']; ?>="change(this)" />
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
@@ -688,7 +688,7 @@ function PMA_editOperations($host, $user)
|
||||
<?php echo $GLOBALS['strHost']; ?> :
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="new_server" size="10" value="<?php echo str_replace('"', '"', $host); ?>" onchange="this.form.anyhost[1].checked = true" />
|
||||
<input type="text" name="new_server" size="10" value="<?php echo str_replace('"', '"', $host); ?>" <?php echo $GLOBALS['chg_evt_handler']; ?>="this.form.anyhost[1].checked = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -702,12 +702,12 @@ function PMA_editOperations($host, $user)
|
||||
<?php echo $GLOBALS['strUserName']; ?> :
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="new_user" size="10" value="<?php echo str_replace('"', '"', $user); ?>" onchange="this.form.anyuser[1].checked = true" />
|
||||
<input type="text" name="new_user" size="10" value="<?php echo str_replace('"', '"', $user); ?>" <?php echo $GLOBALS['chg_evt_handler']; ?>="this.form.anyuser[1].checked = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" name="nopass" value="-1" checked="checked" onclick="new_pw.value = ''; new_pw2.value = ''" />
|
||||
<input type="radio" name="nopass" value="-1" checked="checked" onclick="new_pw.value = ''; new_pw2.value = ''; this.checked = true" />
|
||||
<?php echo $GLOBALS['strKeepPass'] . "\n"; ?>
|
||||
</td>
|
||||
<td colspan="3"> </td>
|
||||
@@ -717,7 +717,7 @@ function PMA_editOperations($host, $user)
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" name="nopass" value="1" onclick="new_pw.value = ''; new_pw2.value = ''" />
|
||||
<input type="radio" name="nopass" value="1" onclick="new_pw.value = ''; new_pw2.value = ''; this.checked = true" />
|
||||
<?php echo $GLOBALS['strNoPassword'] . "\n"; ?>
|
||||
</td>
|
||||
<td> </td>
|
||||
@@ -726,10 +726,10 @@ function PMA_editOperations($host, $user)
|
||||
<?php echo $GLOBALS['strPassword']; ?> :
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="new_pw" size="10" onchange="nopass[2].checked = true" />
|
||||
<input type="password" name="new_pw" size="10" <?php echo $GLOBALS['chg_evt_handler']; ?>="nopass[2].checked = true" />
|
||||
|
||||
<?php echo $GLOBALS['strReType']; ?> :
|
||||
<input type="password" name="new_pw2" size="10" onchange="nopass[2].checked = true" />
|
||||
<input type="password" name="new_pw2" size="10" <?php echo $GLOBALS['chg_evt_handler']; ?>="nopass[2].checked = true" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -989,6 +989,15 @@ $result = @mysql_query('SELECT COUNT(Password) FROM mysql.user');
|
||||
$password_field = (mysql_result($result, 0) ? 'Password' : 'password');
|
||||
|
||||
|
||||
/**
|
||||
* Autocomplete feature of IE kills the "onchange" event handler and it must be
|
||||
* replaced by the "onpropertychange" one in this case
|
||||
*/
|
||||
$chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
|
||||
? 'onpropertychange'
|
||||
: 'onchange';
|
||||
|
||||
|
||||
/**
|
||||
* Displays headers
|
||||
*/
|
||||
|
@@ -91,13 +91,19 @@ if (!empty($error_msg)) {
|
||||
echo '<p><b>' . $strError . ' : ' . $error_msg . '</b></p>' . "\n";
|
||||
}
|
||||
|
||||
// loic1: autocomplete feature of IE kills the "onchange" event handler and it
|
||||
// must be replaced by the "onpropertychange" one in this case
|
||||
$chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
|
||||
? 'onpropertychange'
|
||||
: 'onchange';
|
||||
|
||||
// Displays the form
|
||||
?>
|
||||
<form method="post" action="./user_password.php3" name="chgPassword" onsubmit="return checkPassword(this)">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="radio" name="nopass" value="1" onclick="pma_pw.value = ''; pma_pw2.value = ''" />
|
||||
<input type="radio" name="nopass" value="1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true" />
|
||||
<?php echo $GLOBALS['strNoPassword'] . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -107,10 +113,10 @@ if (!empty($error_msg)) {
|
||||
<?php echo $GLOBALS['strPassword']; ?> :
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="pma_pw" size="10" onchange="nopass[1].checked = true" />
|
||||
<input type="password" name="pma_pw" size="10" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" />
|
||||
|
||||
<?php echo $GLOBALS['strReType']; ?> :
|
||||
<input type="password" name="pma_pw2" size="10" onchange="nopass[1].checked = true" />
|
||||
<input type="password" name="pma_pw2" size="10" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
Reference in New Issue
Block a user