New: Use div instead of tables into login page.

This commit is contained in:
Laurent Destailleur 2013-02-24 14:57:49 +01:00
parent 6b20370ffa
commit 3baf8a6c00
9 changed files with 223 additions and 49 deletions

71
dev/test/testdiv.php Normal file
View File

@ -0,0 +1,71 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
<html>
<head>
<meta name="robots" content="noindex,nofollow" />
<meta name="author" content="Dolibarr Development Team">
<link rel="shortcut icon" type="image/x-icon" href="/dolibarrnew/theme/eldy/img/favicon.ico"/>
<title>Login Dolibarr 3.4.0-alpha</title>
<!-- Includes for JQuery (Ajax library) -->
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
<link rel="stylesheet" type="text/css" title="default" href="/dolibarrnew/custom/filemanager/css/filemanager.css.php"><!-- Added by module filemanager-->
<!-- Includes JS for JQuery -->
<script type="text/javascript" src="/dolibarrnew/includes/jquery/js/jquery-latest.min.js"></script>
<script type="text/javascript" src="/dolibarrnew/core/js/dst.js"></script>
<link rel="stylesheet" type="text/css" href="/dolibarrnew/theme/eldy/style.css.php?lang=fr_FR" />
<!-- HTTP_USER_AGENT = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22 -->
</head>
<body class="body">
<center>
<div class="login_table" align="center">
<!-- <tr><td colspan="2" valign="middle"> -->
<div id="login_line1" align="center">
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><center>
<table class="none" summary="Login pass" cellpadding="2" align="center">
<!-- Login -->
<tr>
<td valign="bottom"> &nbsp; <strong><label for="username">Login</label></strong>fds fs df sdf gdsfgsdf r &nbsp; </td>
<td valign="bottom" nowrap="nowrap">
<input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="" tabindex="1" />
</td>
</tr>
<!-- Password -->
<tr><td valign="top" nowrap="nowrap"> &nbsp; <strong><label for="password">Mot de passe</label></strong> &nbsp; </td>
<td valign="top" nowrap="nowrap">
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="" tabindex="2" autocomplete="off" />
</td></tr>
</table>
</center>
</div> <!-- end div left -->
<!-- </td>
<td align="center" valign="middle">-->
<div id="login_right" style="display: inline-block; min-width: 250px; margin: 0 auto;">
<img alt="Logo" title="" src="/dolibarrnew/theme/dolibarr_logo.png" id="img_logo" />
</div>
</div> <!-- end div line1 -->
<!--</td>
</tr>-->
</div>
</center>
</body>
</html>
<!-- END PHP TEMPLATE -->

View File

@ -62,7 +62,7 @@ class MenuManager
$_SESSION["leftmenuopened"]=""; $_SESSION["leftmenuopened"]="";
} }
else else
{ {
// On va le chercher en session si non defini par le lien // On va le chercher en session si non defini par le lien
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:''; $mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
} }

View File

@ -51,7 +51,8 @@ print $langs->trans("ToolsDesc").'<br><br>';
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com> /* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2011-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -75,7 +75,10 @@ $(document).ready(function () {
}); });
</script> </script>
<center>
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>"> <form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
<input type="hidden" name="mainmenu" value="home" />
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" /> <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<input type="hidden" name="loginfunction" value="loginfunction" /> <input type="hidden" name="loginfunction" value="loginfunction" />
<!-- Add fields to send local user information --> <!-- Add fields to send local user information -->
@ -94,11 +97,14 @@ $(document).ready(function () {
</table> </table>
<br> <br>
<table class="login_table" summary="Login area" cellpadding="2" align="center"> <div class="login_table">
<tr><td colspan="2" valign="middle"> <!-- <tr><td colspan="2" valign="middle"> -->
<table class="none" summary="Login pass" cellpadding="2" align="center"> <div id="login_line1">
<div id="login_left">
<table class="left" summary="Login pass" cellpadding="2">
<!-- Login --> <!-- Login -->
<tr> <tr>
<td valign="bottom"> &nbsp; <strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong> &nbsp; </td> <td valign="bottom"> &nbsp; <strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong> &nbsp; </td>
@ -106,13 +112,11 @@ $(document).ready(function () {
<input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" /> <input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" />
</td> </td>
</tr> </tr>
<!-- Password --> <!-- Password -->
<tr><td valign="top" nowrap="nowrap"> &nbsp; <strong><label for="password"><?php echo $langs->trans('Password'); ?></label></strong> &nbsp; </td> <tr><td valign="top" nowrap="nowrap"> &nbsp; <strong><label for="password"><?php echo $langs->trans('Password'); ?></label></strong> &nbsp; </td>
<td valign="top" nowrap="nowrap"> <td valign="top" nowrap="nowrap">
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo dol_escape_htmltag($password); ?>" tabindex="2" autocomplete="off" /> <input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo dol_escape_htmltag($password); ?>" tabindex="2" autocomplete="off" />
</td></tr> </td></tr>
<?php <?php
if (! empty($hookmanager->resArray['options'])) { if (! empty($hookmanager->resArray['options'])) {
foreach ($hookmanager->resArray['options'] as $format => $option) foreach ($hookmanager->resArray['options'] as $format => $option)
@ -124,7 +128,6 @@ if (! empty($hookmanager->resArray['options'])) {
} }
} }
?> ?>
<?php if ($captcha) { ?> <?php if ($captcha) { ?>
<!-- Captcha --> <!-- Captcha -->
<tr><td valign="middle" nowrap="nowrap"> &nbsp; <b><?php echo $langs->trans('SecurityCode'); ?></b></td> <tr><td valign="middle" nowrap="nowrap"> &nbsp; <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
@ -138,24 +141,27 @@ if (! empty($hookmanager->resArray['options'])) {
</td></tr> </td></tr>
<?php } ?> <?php } ?>
</table> </table>
</td>
<td align="center" valign="middle"> </div> <!-- end div left -->
<div id="login_right">
<img alt="Logo" title="" src="<?php echo $urllogo; ?>" id="img_logo" /> <img alt="Logo" title="" src="<?php echo $urllogo; ?>" id="img_logo" />
</td>
</tr> </div>
</div>
<div id="login_line2" style="clear: both">
<!-- Button Connection --> <!-- Button Connection -->
<tr><td colspan="3" style="text-align:center;"><br> <br><input type="submit" class="button" value="&nbsp; <?php echo $langs->trans('Connection'); ?> &nbsp;" tabindex="5" />
<input type="submit" class="button" value="&nbsp; <?php echo $langs->trans('Connection'); ?> &nbsp;" tabindex="5" />
</td></tr>
<?php <?php
if ($forgetpasslink || $helpcenterlink) { if ($forgetpasslink || $helpcenterlink)
echo '<tr><td colspan="3" align="center">'; {
echo '<br>';
echo '<div align="center" style="margin-top: 4px;">';
if ($forgetpasslink) { if ($forgetpasslink) {
echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">('; echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">(';
echo $langs->trans('PasswordForgotten'); echo $langs->trans('PasswordForgotten');
@ -176,11 +182,13 @@ if ($forgetpasslink || $helpcenterlink) {
} }
echo $langs->trans('NeedHelpCenter').')</a>'; echo $langs->trans('NeedHelpCenter').')</a>';
} }
echo '</td></tr>'; echo '</div>';
} }
?> ?>
</table> </div>
</div>
</form> </form>
@ -233,6 +241,8 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN
<?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?> <?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
</center> <!-- end of center -->
</body> </body>
</html> </html>
<!-- END PHP TEMPLATE --> <!-- END PHP TEMPLATE -->

View File

@ -80,12 +80,6 @@ $img_button=dol_buildpath($path.'/theme/amarok/img/button_bg.png',1);
font-size:100%; font-size:100%;
} }
/*.fiche ul {
margin:0.5em;
padding:0.5em;
padding-left: 2em;
}*/
body { body {
background-color:#f5f5f5; background-color:#f5f5f5;
<?php if ($_SESSION['dol_login'] != '') {?> <?php if ($_SESSION['dol_login'] != '') {?>
@ -178,11 +172,29 @@ form {
margin:0px; margin:0px;
} }
.valignmiddle {
vertical-align: middle;
}
.centpercent {
width: 100%;
}
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */ /* ============================================================================== */
/* Login */ /* Login */
/* ============================================================================== */ /* ============================================================================== */
body.body center{color:white;}
form#login { form#login {
display:block; display:block;
border:solid 1px rgba(0,0,0,.4); border:solid 1px rgba(0,0,0,.4);
@ -240,7 +252,12 @@ form#login table.login_table {
background:none !important; background:none !important;
} }
body.body center{color:white;} div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
table.login_table { background-color: red !important;} table.login_table { background-color: red !important;}
table.login_table tr td {vertical-align:middle;} table.login_table tr td {vertical-align:middle;}

View File

@ -161,12 +161,22 @@ div.float
{ {
float:<?php print $left; ?>; float:<?php print $left; ?>;
} }
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
} }
.centpercent { .centpercent {
width: 100%; width: 100%;
} }
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */ /* ============================================================================== */
@ -488,7 +498,9 @@ form#login {
} }
.login_table { .login_table {
padding:12px; padding:12px;
width: 540px; margin-left: 10px;
margin-right: 10px;
max-width: 540px;
border: 1px solid #C0C0C0; border: 1px solid #C0C0C0;
background-color: #E0E0E0; background-color: #E0E0E0;
@ -527,6 +539,13 @@ div.login_block table {
display: inline; display: inline;
} }
div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px;

View File

@ -183,12 +183,22 @@ form {
padding: 0em 0em 0em 0em; padding: 0em 0em 0em 0em;
margin: 0em 0em 0em 0em; margin: 0em 0em 0em 0em;
} }
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
} }
.centpercent { .centpercent {
width: 100%; width: 100%;
} }
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */ /* ============================================================================== */
@ -521,7 +531,9 @@ form#login {
font-size: 13px; font-size: 13px;
} }
.login_table_title { .login_table_title {
width: 540px; margin-left: 10px;
margin-right: 10px;
max-width: 540px;
color: #888888; color: #888888;
text-shadow: 1px 1px 1px #FFF; text-shadow: 1px 1px 1px #FFF;
} }
@ -529,8 +541,10 @@ form#login {
text-shadow: 1px 1px 1px #FFF; text-shadow: 1px 1px 1px #FFF;
} }
.login_table { .login_table {
margin-left: 10px;
margin-right: 10px;
padding:12px; padding:12px;
width: 540px; max-width: 540px;
border: 1px solid #C0C0C0; border: 1px solid #C0C0C0;
background-color: #E0E0E0; background-color: #E0E0E0;
@ -570,6 +584,13 @@ div.login_block table {
display: inline; display: inline;
} }
div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px;
@ -2138,13 +2159,9 @@ div.table-val-border-col {
/* ============================================================================== */ /* ============================================================================== */
#login { #login {
position: relative;
display: block; display: block;
width: 480px;
height: auto; height: auto;
top: 20px; top: 20px;
left: 50%;
margin-left: -240px;
margin-bottom: 30px; margin-bottom: 30px;
} }

View File

@ -166,12 +166,22 @@ div.float
{ {
float:<?php print $left; ?>; float:<?php print $left; ?>;
} }
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
} }
.centpercent { .centpercent {
width: 100%; width: 100%;
} }
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */ /* ============================================================================== */
@ -535,7 +545,7 @@ form#login {
font-size: 13px; font-size: 13px;
} }
.login_table_title { .login_table_title {
width: 540px; max-width: 540px;
color: #888888; color: #888888;
text-shadow: 1px 1px 1px #FFF; text-shadow: 1px 1px 1px #FFF;
} }
@ -543,8 +553,10 @@ form#login {
text-shadow: 1px 1px 1px #FFF; text-shadow: 1px 1px 1px #FFF;
} }
.login_table { .login_table {
margin-left: 10px;
margin-right: 10px;
padding:12px; padding:12px;
width: 540px; max-width: 540px;
border: 1px solid #C0C0C0; border: 1px solid #C0C0C0;
background-color: #E0E0E0; background-color: #E0E0E0;
@ -583,6 +595,13 @@ div.login_block table {
display: inline; display: inline;
} }
div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px;

View File

@ -303,12 +303,22 @@ th .button {
-webkit-border-radius:0px !important; -webkit-border-radius:0px !important;
border-radius:0px !important; border-radius:0px !important;
} }
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
} }
.centpercent { .centpercent {
width: 100%; width: 100%;
} }
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */ /* ============================================================================== */
@ -712,12 +722,13 @@ foreach($mainmenuusedarray as $val)
/* Login */ /* Login */
form#login { form#login {
margin-top: 70px; margin-top: 60px;
margin-bottom: 30px; margin-bottom: 30px;
font-size: 13px; font-size: 13px;
vertical-align: middle;
} }
.login_table_title { .login_table_title {
width: 540px; max-width: 540px;
color: #888888; color: #888888;
text-shadow: 1px 1px 1px #FFF; text-shadow: 1px 1px 1px #FFF;
} }
@ -725,11 +736,13 @@ form#login {
text-shadow: 1px 1px 1px #FFF; text-shadow: 1px 1px 1px #FFF;
} }
.login_table { .login_table {
margin-left: 10px;
margin-right: 10px;
padding-left:6px; padding-left:6px;
padding-right:6px; padding-right:6px;
padding-top:14px; padding-top:12px;
padding-bottom:12px; padding-bottom:12px;
width: 540px; max-width: 540px;
border: 1px solid #C0C0C0; border: 1px solid #C0C0C0;
background-color: #E0E0E0; background-color: #E0E0E0;
@ -747,6 +760,13 @@ form#login {
background-image: -ms-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%); background-image: -ms-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
background-image: linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%); background-image: linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
} }
div#login_left, div#login_right {
display: inline-block;
min-width: 250px;
padding-top: 10px;
text-align: center;
vertical-align: middle;
}
table.login_table tr td table.none tr td { table.login_table tr td table.none tr td {
padding: 2px; padding: 2px;
} }