summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c97c9b8)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12910
7612ce4b-ef26-0410-bec9-
ea0150e637f0
/* Output the javascript onload function. */
$header = "<script type=\"text/javascript\">\n" .
"<!--\n".
/* Output the javascript onload function. */
$header = "<script type=\"text/javascript\">\n" .
"<!--\n".
+ " var alreadyFocused = false;\n".
" function squirrelmail_loginpage_onload() {\n".
" function squirrelmail_loginpage_onload() {\n".
+ " if (alreadyFocused) return;\n".
" var textElements = 0; var i = 0;\n".
" for (i = 0; i < document.forms[0].elements.length; i++) {\n".
" if (document.forms[0].elements[i].type == \"text\" || document.forms[0].elements[i].type == \"password\") {\n".
" var textElements = 0; var i = 0;\n".
" for (i = 0; i < document.forms[0].elements.length; i++) {\n".
" if (document.forms[0].elements[i].type == \"text\" || document.forms[0].elements[i].type == \"password\") {\n".
<?php echo _("Name:"); ?>
</td>
<td class="sqm_loginFieldInput">
<?php echo _("Name:"); ?>
</td>
<td class="sqm_loginFieldInput">
- <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" />
+ <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" onfocus="alreadyFocused=true;" />
<?php echo _("Password:"); ?>
</td>
<td class="sqm_loginFieldInput">
<?php echo _("Password:"); ?>
</td>
<td class="sqm_loginFieldInput">
- <input type="password" name="secretkey" value="" id="secretkey" />
+ <input type="password" name="secretkey" value="" id="secretkey" onfocus="alreadyFocused=true;" />
<?php echo $login_extra; ?>
</td>
</tr>
<?php echo $login_extra; ?>
</td>
</tr>
<?php echo _("Name:"); ?>
</td>
<td class="fieldInput">
<?php echo _("Name:"); ?>
</td>
<td class="fieldInput">
- <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" class="input" />
+ <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" class="input" onfocus="alreadyFocused=true;" />
<?php echo _("Password:"); ?>
</td>
<td class="fieldInput">
<?php echo _("Password:"); ?>
</td>
<td class="fieldInput">
- <input type="password" name="secretkey" value="" id="secretkey" class="input" />
+ <input type="password" name="secretkey" value="" id="secretkey" class="input" onfocus="alreadyFocused=true;" />
<?php echo $login_extra; ?>
</td>
</tr>
<?php echo $login_extra; ?>
</td>
</tr>