Changed login to use only one template with and without domain-selectbox. As everything is identical, but that one box.

This commit is contained in:
Ralf Becker 2003-10-15 12:55:48 +00:00
parent 7363643128
commit f32c6a2e23
5 changed files with 13 additions and 197 deletions

View File

@ -44,6 +44,7 @@
$tmpl->pfp('loginout','login_form'); $tmpl->pfp('loginout','login_form');
exit; exit;
} }
$tmpl->set_file(array('login_form' => 'login.tpl'));
// !! NOTE !! // !! NOTE !!
// Do NOT and I repeat, do NOT touch ANYTHING to do with lang in this file. // Do NOT and I repeat, do NOT touch ANYTHING to do with lang in this file.
@ -68,15 +69,6 @@
} }
*/ */
if (! $deny_login && ! $GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
{
$tmpl->set_file(array('login_form' => 'login.tpl'));
}
elseif ($GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
{
$tmpl->set_file(array('login_form' => 'login_selectdomain.tpl'));
}
function check_logoutcode($code) function check_logoutcode($code)
{ {
switch($code) switch($code)
@ -235,10 +227,11 @@
} }
} }
$domain_select = ' ';
$last_loginid = $_COOKIE['last_loginid']; $last_loginid = $_COOKIE['last_loginid'];
if ($GLOBALS['phpgw_info']['server']['show_domain_selectbox']) if ($GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
{ {
$domain_select = ''; // For security ... just in case $domain_select = "<select name=\"logindomain\">\n";
foreach($GLOBALS['phpgw_domain'] as $domain_name => $domain_vars) foreach($GLOBALS['phpgw_domain'] as $domain_name => $domain_vars)
{ {
$domain_select .= '<option value="' . $domain_name . '"'; $domain_select .= '<option value="' . $domain_name . '"';
@ -247,9 +240,9 @@
{ {
$domain_select .= ' selected'; $domain_select .= ' selected';
} }
$domain_select .= '>' . $domain_name . '</option>'; $domain_select .= '>' . $domain_name . "</option>\n";
} }
$tmpl->set_var('select_domain',$domain_select); $domain_select .= "</select>\n";
} }
elseif ($last_loginid !== '') elseif ($last_loginid !== '')
{ {
@ -261,6 +254,7 @@
$last_loginid .= '@' . $_COOKIE['last_domain']; $last_loginid .= '@' . $_COOKIE['last_domain'];
} }
} }
$tmpl->set_var('select_domain',$domain_select);
foreach($_GET as $name => $value) foreach($_GET as $name => $value)
{ {

View File

@ -4,7 +4,7 @@
<HEAD> <HEAD>
<META http-equiv="Content-Type" content="text/html; charset={charset}"> <META http-equiv="Content-Type" content="text/html; charset={charset}">
<META name="AUTHOR" content="phpGroupWare http://www.phpgroupware.org"> <META name="AUTHOR" content="dGroupWare http://www.eGroupWare.org">
<META NAME="description" CONTENT="{website_title} login screen, working environment powered by eGroupWare"> <META NAME="description" CONTENT="{website_title} login screen, working environment powered by eGroupWare">
<META NAME="keywords" CONTENT="{website_title} login screen, eGroupWare, groupware, groupware suite"> <META NAME="keywords" CONTENT="{website_title} login screen, eGroupWare, groupware, groupware suite">
@ -33,21 +33,23 @@
<input type="hidden" name="passwd_type" value="text"> <input type="hidden" name="passwd_type" value="text">
<TABLE border="0" align="CENTER" bgcolor="#486591" width="100%" cellpadding="0" cellspacing="0"> <TABLE border="0" align="CENTER" bgcolor="#486591" width="100%" cellpadding="0" cellspacing="0">
<TR bgcolor="#e6e6e6"> <TR bgcolor="#e6e6e6">
<TD colspan="2" align="CENTER">{cd}</TD> <TD colspan="3" align="CENTER">{cd}</TD>
</TR> </TR>
<TR bgcolor="#e6e6e6"> <TR bgcolor="#e6e6e6">
<TD align="RIGHT"><font color="#000000">{lang_username}:&nbsp;</font></TD> <TD align="RIGHT"><font color="#000000">{lang_username}:&nbsp;</font></TD>
<TD><input name="login" value="{cookie}"></TD> <TD><input name="login" value="{cookie}"></TD>
<TD>{select_domain}</TD>
</TR> </TR>
<TR bgcolor="#e6e6e6"> <TR bgcolor="#e6e6e6">
<TD align="RIGHT"><font color="#000000">{lang_password}:&nbsp;</font></TD> <TD align="RIGHT"><font color="#000000">{lang_password}:&nbsp;</font></TD>
<TD><input name="passwd" type="password"></TD> <TD><input name="passwd" type="password"></TD>
<TD>&nbsp;</TD>
</TR> </TR>
<TR bgcolor="#e6e6e6"> <TR bgcolor="#e6e6e6">
<TD colspan="2" align="CENTER"><input type="submit" value="{lang_login}" name="submitit"></TD> <TD colspan="3" align="CENTER"><input type="submit" value="{lang_login}" name="submitit"></TD>
</TR> </TR>
<TR bgcolor="#e6e6e6"> <TR bgcolor="#e6e6e6">
<TD colspan="2" align="right"><font color="#000000" size="-1">phpGroupWare {version}</font></TD> <TD colspan="3" align="right"><font color="#000000" size="-1">eGroupWare {version}</font></TD>
</TR> </TR>
</TABLE> </TABLE>
</FORM> </FORM>

View File

@ -1,71 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<!-- BEGIN login_form -->
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset={charset}">
<META name="AUTHOR" content="phpGroupWare http://www.phpgroupware.org">
<META NAME="description" CONTENT="{website_title} login screen, working environment powered by eGroupWare">
<META NAME="keywords" CONTENT="{website_title} login screen, eGroupWare, groupware, groupware suite">
<TITLE>{website_title} - Login</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<a href="http://{logo_url}"><img src="{logo_file}" alt="{logo_title}" title="{logo_title}" border="0"></a>
<p>&nbsp;</p>
<CENTER>{lang_message}</CENTER>
<p>&nbsp;</p>
<TABLE bgcolor="#000000" border="0" cellpadding="0" cellspacing="0" width="50%" align="CENTER">
<TR>
<TD>
<TABLE border="0" width="100%" bgcolor="#486591" cellpadding="2" cellspacing="1">
<TR bgcolor="#486591">
<TD align="LEFT" valign="MIDDLE">
<font color="#fefefe">&nbsp;phpGroupWare</font>
</TD>
</TR>
<TR bgcolor="#e6e6e6">
<TD valign="BASELINE">
<FORM method="post" action="{login_url}">
<input type="hidden" name="passwd_type" value="text">
<TABLE border="0" align="CENTER" bgcolor="#486591" width="100%" cellpadding="0" cellspacing="0">
<TR bgcolor="#e6e6e6">
<TD colspan="3" align="CENTER">
{cd}
</TD>
</TR>
<TR bgcolor="#e6e6e6">
<TD align="RIGHT"><font color="#000000">{lang_username}:</font></TD>
<TD align="RIGHT"><input name="login" value="{cookie}"></TD>
<TD align="LEFT">&nbsp;@&nbsp;<select name="logindomain">{select_domain}</select></TD>
</TR>
<TR bgcolor="#e6e6e6">
<TD align="RIGHT"><font color="#000000">{lang_password}:</font></TD>
<TD align="RIGHT"><input name="passwd" type="password" onChange="this.form.submit()"></TD>
<TD>&nbsp;</TD>
</TR>
<TR bgcolor="#e6e6e6">
<TD colspan="3" align="CENTER">
<input type="submit" value="{lang_login}" name="submitit">
</TD>
</TR>
<TR bgcolor="#e6e6e6">
<TD colspan="3" align="RIGHT">
<font color="#000000" size="-1">{version}</font>
</TD>
</TR>
</TABLE>
</FORM>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<!-- END login_form -->
</HTML>

View File

@ -59,7 +59,7 @@
<tr bgcolor="#e6e6e6"> <tr bgcolor="#e6e6e6">
<td align="right"><font color="#000000">{lang_username}:&nbsp;</font></td> <td align="right"><font color="#000000">{lang_username}:&nbsp;</font></td>
<td align="left"><input name="login" value="{cookie}" style="width: 100px; border: 1px solid silver;"></td> <td align="left"><input name="login" value="{cookie}" style="width: 100px; border: 1px solid silver;"></td>
<td align="left"><select name="logindomain">{select_domain}</select></td> <td align="left">{select_domain}</td>
</tr> </tr>
<tr bgcolor="#e6e6e6"> <tr bgcolor="#e6e6e6">
<td align="right"><font color="#000000">{lang_password}:&nbsp;</font></td> <td align="right"><font color="#000000">{lang_password}:&nbsp;</font></td>

View File

@ -1,109 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={charset}">
<meta name="author" content="eGroupWare http://www.phpgroupware.org">
<meta name="description" content="eGroupWare login screen">
<meta name="keywords" content="eGroupWare login screen">
<link rel="stylesheet" href="phpgwapi/templates/{template_set}/css/idots.css" type="text/css">
<link rel="icon" href="phpgwapi/templates/idots/images/favicon.ico" type="image/x-ico">
<link rel="shortcut icon" href="phpgwapi/templates/idots/images/favicon.ico">
<title>{website_title} - Login</title>
<style type="text/css">
#containerDiv
{
position:absolute;
width:100%;
left:0px;
top:40%;
vertical-align: bottom;
}
#centerBox
{
position:relative;
width:100%;
top:-80px;
height:134px;
z-index:9;
}
</style>
</head>
<body bgcolor="#ffffff">
<br>
<a href="http://{logo_url}"><img src="{logo_file}" alt="{logo_title}" title="{logo_title}" border="0"></a>
<div id="containerDiv">
<div id="centerBox">
<center>{lang_message}</center>
<p>&nbsp;</p>
<form name="login_form" method="post" action="{login_url}">
<table class=sidebox cellspacing=1 cellpadding=0 border=0 align=center>
<tr>
<td class="sideboxtitle" align="center" height=28>{website_title}</td>
</tr>
<tr>
<td class="sideboxcontent" bgcolor="#efefef">
<table class="sideboxtext" cellspacing=0 cellpadding=0 width="100%" border="0">
<tr bgcolor="#e6e6e6">
<td colspan="3" align="center">
{cd}
<br>
<img width="300" height="1" src="phpgwapi/templates/{template_set}/images/spacer.gif" alt="">
</td>
</tr>
<tr bgcolor="#e6e6e6">
<td colspan="3"> <input type="hidden" name="passwd_type" value="text"> </td>
</tr>
<tr bgcolor="#e6e6e6">
<td align="right"><font color="#000000">{lang_username}:&nbsp;</font></td>
<td align="left"><input name="login" value="{cookie}" style="width: 100px; border: 1px solid silver;"></td>
<td align="left"><select name="logindomain">{select_domain}</select></td>
</tr>
<tr bgcolor="#e6e6e6">
<td align="right"><font color="#000000">{lang_password}:&nbsp;</font></td>
<td align="left"><input name="passwd" type="password" onChange="this.form.submit()" style="WIDTH: 100px; border: 1px solid silver;"></td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="#e6e6e6">
<td colspan="3" align="center">
&nbsp;
</td>
</tr>
<tr bgcolor="#e6e6e6">
<td colspan="3" align="center">
<input type="submit" value="{lang_login}" name="submitit" style="border: 1px solid silver;">
</td>
</tr>
<tr bgcolor="#e6e6e6">
<td colspan="3" align="center">
&nbsp;
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<script language="javascript1.2" type="text/javascript">
<!--
// position cursor in top form field
document.login_form.login.focus();
//-->
</script>
</div>
</div>
<div style="bottom:10px;left:10px;position:absolute;visibility:hidden;">
<img src="phpgwapi/templates/{template_set}/images/valid-html401.png" border="0" alt="Valid HTML 4.01">
<img src="phpgwapi/templates/{template_set}/images/vcss.png" border="0" alt="Valid CSS">
</div>
<div style="bottom:10px;right:10px;position:absolute;">
<a href="http://www.egroupware.org" target="_blank">eGroupWare</a> {version}</div>
</body>
</html>