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. * libraries/auth/cookie.auth.lib.php: Try to load mcrypt extension.
* Documentation.html, config.default.php, libraries/common.lib.php: * Documentation.html, config.default.php, libraries/common.lib.php:
Configurable default connection collation (RFE #1025969). 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> 2005-11-22 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* added test/theme.php: for testing themes * added test/theme.php: for testing themes

View File

@@ -601,6 +601,18 @@ div#serverstatus table .tblFooters a:after {
} }
/* end serverstatus */ /* 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 { img.lightbulb {
cursor: pointer; cursor: pointer;

View File

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