Skip to content

Commit

Permalink
Remove inline javascript to focus on form field
Browse files Browse the repository at this point in the history
  • Loading branch information
Udera committed Apr 5, 2017
1 parent 53a19b6 commit e65a973
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions vexim/adminaliasadd.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<title><?php echo _('Virtual Exim') . ': ' . _('Manage Users'); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.adminadd.realname.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="adminalias.php"><?php echo _('Manage Aliases'); ?></a><br>
Expand All @@ -27,7 +27,7 @@
<table align="center">
<tr>
<td><?php echo _('Alias Name'); ?>:</td>
<td><input name="realname" type="text" class="textfield"></td>
<td><input name="realname" type="text" class="textfield" autofocus></td>
</tr>
<tr>
<td><?php echo _('Address'); ?>:</td>
Expand Down
4 changes: 2 additions & 2 deletions vexim/adminaliaschange.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<title><?php echo _('Virtual Exim') . ': ' . _('Manage Users'); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.aliaschange.realname.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="adminalias.php"><?php echo _('Manage Aliases'); ?></a><br>
Expand All @@ -50,7 +50,7 @@
<td><?php echo _('Alias Name'); ?>:</td>
<td>
<input name="realname" type="text"
value="<?php print $row['realname']; ?>" class="textfield">
value="<?php print $row['realname']; ?>" class="textfield" autofocus>
</td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions vexim/adminfailadd.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title><?php echo _('Virtual Exim') . ': ' . _('Manage Users'); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.adminadd.localpart.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="adminfail.php"><?php echo _('Manage Fails'); ?></a><br>
Expand All @@ -23,7 +23,7 @@
<tr>
<td><?php echo _('Address to fail'); ?>:</td>
<td>
<input name="localpart" type="text" class="textfield">@
<input name="localpart" type="text" class="textfield" autofocus>@
<?php print $_SESSION['domain']; ?>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions vexim/adminfailchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<title><?php echo _('Virtual Exim') . ': ' . _('Manage Users'); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.failchange.localpart.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="adminfail.php"><?php echo _('Manage Fails'); ?></a><br>
Expand All @@ -40,7 +40,7 @@
<td><?php echo _('Fail address'); ?>:</td>
<td>
<input name="localpart" type="text"
value="<?php print $row['localpart']; ?>" class="textfield">@
value="<?php print $row['localpart']; ?>" class="textfield" autofocus>@
<?php print $_SESSION['domain']; ?>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions vexim/admingroupadd.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<title><?php echo _('Virtual Exim') . ': ' . _('Add Group'); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.adminadd.localpart.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="admingroup.php"><?php echo _('Manage Groups'); ?></a><br>
Expand All @@ -22,7 +22,7 @@
<tr>
<td><?php echo _('Group Address'); ; ?>:</td>
<td>
<input name="localpart" type="text" class="textfield">@
<input name="localpart" type="text" class="textfield" autofocus>@
<?php echo $_SESSION['domain']; ?>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions vexim/admingroupchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<title><?php echo _('Virtual Exim') . ': ' . _('Edit group'); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.groupchange.realname.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="admingroup.php"><?php echo _('Manage Groups'); ?></a><br>
Expand All @@ -42,7 +42,7 @@
<td><?php echo _('Group Address'); ?>:</td>
<td>
<input name="localpart" type="text"
value="<?php echo $row['name']; ?>"class="textfield">@
value="<?php echo $row['name']; ?>"class="textfield" autofocus>@
<?php echo $_SESSION['domain']; ?>
<input name="group_id" type="hidden"
value="<?php echo $_GET['group_id']; ?>" class="textfield">
Expand Down
4 changes: 2 additions & 2 deletions vexim/adminuseradd.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<link rel="stylesheet" href="style.css" type="text/css">
<script src="scripts.js" type="text/javascript"></script>
</head>
<body onLoad="document.adminadd.realname.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="adminuser.php"><?php echo _('Manage Accounts'); ?></a><br>
Expand All @@ -46,7 +46,7 @@
<tr>
<td><?php echo _('Name'); ?>:</td>
<td colspan="2">
<input type="textfield" size="25" name="realname" class="textfield">
<input type="textfield" size="25" name="realname" class="textfield" autofocus>
</td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions vexim/adminuserchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function boxadd() {

</script>
</head>
<body onLoad="document.userchange.realname.focus(); fwac()">
<body onLoad="fwac()">
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id="Menu">
<a href="adminuser.php"><?php echo _('Manage Accounts'); ?></a><br>
Expand All @@ -71,7 +71,7 @@ function boxadd() {
<td><?php echo _('Name'); ?>:</td>
<td>
<input type="text" size="25" name="realname"
value="<?php print $row['realname']; ?>" class="textfield">
value="<?php print $row['realname']; ?>" class="textfield" autofocus>
<input name="user_id" type="hidden"
value="<?php print $_GET['user_id']; ?>">
</td>
Expand Down
4 changes: 2 additions & 2 deletions vexim/siteadd.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link rel="stylesheet" href="style.css" type="text/css">
<script src="scripts.js" type="text/javascript"></script>
</head>
<body onLoad="document.siteadd.domain.focus()">
<body>
<?php include dirname(__FILE__) . '/config/header.php'; ?>
<div id='menu'>
<a href="site.php"><?php echo _('Manage Domains'); ?></a><br>
Expand All @@ -23,7 +23,7 @@
<table align="center">
<tr>
<td><?php echo _('New Domain'); ?>:</td>
<td><input name="domain" type="text" class="textfield"></td>
<td><input name="domain" type="text" class="textfield" autofocus></td>
<td>
<?php echo _('The name of the new domain you are adding'); ?>
</td>
Expand Down
4 changes: 2 additions & 2 deletions vexim/sitechange.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title><?php echo _("Virtual Exim") . ": " . _("Manage Domains"); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.passwordchange.localpart.focus()">
<body>
<?php include dirname(__FILE__) . "/config/header.php"; ?>
<div id="Menu">
<a href="site.php"><?php echo _("Manage Domains"); ?></a><br>
Expand All @@ -26,7 +26,7 @@
</tr>
<tr>
<td><?php echo _("Admin"); ?>:</td>
<td><select name="localpart" class="textfield">
<td><select name="localpart" class="textfield" autofocus>
<?php
$query = "SELECT localpart,domain FROM users,domains
WHERE domains.domain_id=:domain_id
Expand Down
4 changes: 2 additions & 2 deletions vexim/sitepassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title><?php echo _("Virtual Exim") . ": " . _("Manage Sites"); ?></title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onLoad="document.sitepassword.password.focus()">
<body>
<?php include dirname(__FILE__) . "/config/header.php"; ?>
<div id="Menu">
<a href="site.php"><?php echo _("Manage Domains"); ?></a><br>
Expand All @@ -21,7 +21,7 @@
<form name="sitepassword" method="post" action="sitepasswordsubmit.php">
<table align="center">
<tr><td colspan="2" style="padding-bottom:1em"><?php echo _("Change SiteAdmin Password"); ?>:</td></tr>
<tr><td><?php echo _("Password"); ?>:</td><td><input type="password" size="25" name="clear"></td></tr>
<tr><td><?php echo _("Password"); ?>:</td><td><input type="password" size="25" name="clear" autofocus></td></tr>
<tr><td><?php echo _("Verify Password"); ?>:</td><td><input type="password" size="25" name="vclear"></td></tr>
<tr><td id="button" colspan="2"><input name="submit" type="submit" value="<?php echo _("Submit"); ?>"></td></tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions vexim/userchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ function fwac() {
}
</script>
</head>
<body onLoad="document.forms[0].elements[0].focus(); fwac()">
<body onLoad="fwac()">
<?php include dirname(__FILE__) . "/config/header.php"; ?>
<div id="Menu">
<a href="logout.php"><?php echo _("Logout"); ?></a><br>
</div>
<div id="forms">
<form name="userchange" method="post" action="userchangesubmit.php">
<table align="center">
<tr><td><?php echo _("Name"); ?>:</td><td><input name="realname" type="text" value="<?php print $row['realname']; ?>" class="textfield"></td></tr>
<tr><td><?php echo _("Name"); ?>:</td><td><input name="realname" type="text" value="<?php print $row['realname']; ?>" class="textfield" autofocus></td></tr>
<tr><td><?php echo _("Email Address"); ?>:</td><td><?php print $row['localpart']."@".$_SESSION['domain']; ?></td>
<tr><td><?php echo _("Password"); ?>:</td><td><input name="clear" type="password" class="textfield"></td></tr>
<tr><td><?php echo _("Verify Password"); ?>:</td><td><input name="vclear" type="password" class="textfield"></td></tr>
Expand Down

0 comments on commit e65a973

Please sign in to comment.