Use fieldsets on login form (RFE #1364546).

This commit is contained in:
Michal Čihař
2005-11-23 14:25:08 +00:00
parent 0567bfe215
commit 331fb423ef
3 changed files with 54 additions and 55 deletions

View File

@@ -29,6 +29,8 @@ $Source$
* libraries/auth/cookie.auth.lib.php: Try to load mcrypt extension.
* Documentation.html, config.default.php, libraries/common.lib.php:
Configurable default connection collation (RFE #1025969).
* css/phpmyadmin.css.php, libraries/auth/cookie.auth.lib.php: Use
fieldsets on login form (RFE #1364546).
2005-11-22 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* added test/theme.php: for testing themes

View File

@@ -601,6 +601,18 @@ div#serverstatus table .tblFooters a:after {
}
/* end serverstatus */
/* body.loginform form,*/
body.loginform h1,
body.loginform a.logo {
display: block;
text-align: center;
}
form.login label {
float: left;
width: 10em;
font-weight: bolder;
}
img.lightbulb {
cursor: pointer;

View File

@@ -110,22 +110,21 @@ function PMA_auth()
$page_title = 'phpMyAdmin ' . PMA_VERSION;
require('./libraries/header_meta_style.inc.php');
?>
<script language="javascript" type="text/javascript">
<!--
<script type="text/javascript" language="javascript">
//<![CDATA[
// show login form in top frame
if (top != self) {
window.top.location.href=location;
}
//-->
//]]>
</script>
</head>
<body bgcolor="<?php echo $cfg['RightBgColor']; ?>">
<body class="loginform" bgcolor="<?php echo $cfg['RightBgColor']; ?>">
<?php include('./config.header.inc.php'); ?>
<center>
<a href="http://www.phpmyadmin.net" target="_blank"><?php
<a href="http://www.phpmyadmin.net" target="_blank" class="logo"><?php
$logo_image = $GLOBALS['pmaThemeImage'] . 'logo_right.png';
if (@file_exists($logo_image)) {
echo '<img src="' . $logo_image . '" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" />';
@@ -134,7 +133,12 @@ if (top != self) {
. 'border="0" width="88" height="31" alt="phpMyAdmin" />';
}
?></a>
<h2><?php echo sprintf($GLOBALS['strWelcome'], ' phpMyAdmin ' . PMA_VERSION); ?></h2>
<h1>
<?php
echo sprintf( $GLOBALS['strWelcome'],
'<bdo dir="ltr" xml:lang="en">phpMyAdmin ' . PMA_VERSION . '</bdo>');
?>
</h1>
<?php
// Displays the languages form
if (empty($cfg['Lang'])) {
@@ -165,42 +169,32 @@ if (top != self) {
?>
<br />
<!-- Login form -->
<form method="post" action="index.php" name="login_form"<?php echo $autocomplete; ?> target="_top">
<table cellpadding="3" cellspacing="0">
<tr>
<th align="left" colspan="2" class="tblHeaders" style="font-size: 14px; font-weight: bold;"><?php echo $GLOBALS['strLogin']; ?></th>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>"><?php echo '(' . $GLOBALS['strCookiesRequired'] . ')'; ?></td>
</tr>
<form method="post" action="index.php" name="login_form"<?php echo $autocomplete; ?> target="_top" class="login">
<fieldset>
<legend><?php echo $GLOBALS['strLogin']; ?></legend>
<p><?php echo '(' . $GLOBALS['strCookiesRequired'] . ')'; ?></p>
<?php if ($GLOBALS['cfg']['AllowArbitraryServer']) { ?>
<tr>
<td align="right" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>"><b><?php echo $GLOBALS['strLogServer']; ?>:&nbsp;</b></td>
<td align="<?php echo $cell_align; ?>" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>">
<input type="text" name="pma_servername" value="<?php echo (isset($default_server) ? htmlspecialchars($default_server) : ''); ?>" size="24" class="textfield" onfocus="this.select()" />
</td>
</tr>
<div class="item">
<label for="input_servername"><?php echo $GLOBALS['strLogServer']; ?></label>
<input type="text" name="pma_servername" id="input_servername" value="<?php echo (isset($default_server) ? htmlspecialchars($default_server) : ''); ?>" size="24" class="textfield" />
</div>
<?php } ?>
<tr>
<td align="right" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>"><b><?php echo $GLOBALS['strLogUsername']; ?>&nbsp;</b></td>
<td align="<?php echo $cell_align; ?>" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>">
<input type="text" name="pma_username" value="<?php echo (isset($default_user) ? htmlspecialchars($default_user) : ''); ?>" size="24" class="textfield" onfocus="this.select()" />
</td>
</tr>
<tr>
<td align="right" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>"><b><?php echo $GLOBALS['strLogPassword']; ?>&nbsp;</b></td>
<td align="<?php echo $cell_align; ?>" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>">
<input type="password" name="pma_password" value="" size="24" class="textfield" onfocus="this.select()" />
</td>
</tr>
<div class="item">
<label for="input_username"><?php echo $GLOBALS['strLogUsername']; ?></label>
<input type="text" name="pma_username" id="input_username" value="<?php echo (isset($default_user) ? htmlspecialchars($default_user) : ''); ?>" size="24" class="textfield" />
</div>
<div class="item">
<label for="input_password"><?php echo $GLOBALS['strLogPassword']; ?></label>
<input type="password" name="pma_password" id="input_password" value="" size="24" class="textfield" />
</div>
<?php
if (count($cfg['Servers']) > 1) {
echo "\n";
?>
<tr>
<td align="right" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>"><b><?php echo $GLOBALS['strServerChoice']; ?>:&nbsp;</b></td>
<td align="<?php echo $cell_align; ?>" bgcolor="<?php echo $GLOBALS['cfg']['BgcolorOne']; ?>">
<select name="server"
<div class="item">
<label for="select_server"><?php echo $GLOBALS['strServerChoice']; ?>:</label>
<select name="server" id="select_server"
<?php
if ($GLOBALS['cfg']['AllowArbitraryServer']) {
echo ' onchange="document.forms[\'login_form\'].elements[\'pma_servername\'].value = \'\'" ';
@@ -244,20 +238,15 @@ if (top != self) {
} // end while
?>
</select>
</td>
</tr>
</div>
<?php
} // end if (server choice)
echo "\n";
?>
<tr>
<td colspan="2" align="right">
<?php
if (count($cfg['Servers']) == 1) {
} else {
echo ' <input type="hidden" name="server" value="' . $server . '" />';
}
echo "\n";
} // end if (server choice)
?>
</fieldset>
<fieldset class="tblFooters">
<input value="<?php echo $GLOBALS['strGo']; ?>" type="submit" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<?php
@@ -268,12 +257,8 @@ if (top != self) {
echo ' <input type="hidden" name="table" value="' . htmlspecialchars($GLOBALS['table']) . '" />' . "\n";
}
?>
<input type="submit" value="<?php echo $GLOBALS['strLogin']; ?>" id="buttonYes" />
</td>
</tr>
</table>
</fieldset>
</form>
</center>
<script type="text/javascript" language="javascript">
<!--