Applied patch from Jeff Kymer,

Add extra documentation in login.php
Make better lay-out in login.tpl
This commit is contained in:
Pim Snel 2004-09-28 08:51:50 +00:00
parent bc30bb88dd
commit f85bc9cd52
2 changed files with 64 additions and 27 deletions

View File

@ -315,6 +315,7 @@
$last_loginid .= '@' . $_COOKIE['last_domain'];
}
}
$tmpl->set_var('lang_select_domain',lang('Domain'));
$tmpl->set_var('select_domain',$domain_select);
foreach($_GET as $name => $value)
@ -339,17 +340,43 @@
$cnf_reg->read_repository();
$config_reg = $cnf_reg->config_data;
if($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True')
if($config_reg[enable_registration]=='True')
{
if ($config_reg[register_link]=='True')
{
$reg_link='&nbsp;<a href="registration/">'.lang('Not a user yet? Register now').'</a><br/>';
}
if ($config_reg[lostpassword_link]=='True')
{
$lostpw_link='&nbsp;<a href="registration/main.php?menuaction=registration.boreg.lostpw1">'.lang('Lost password').'</a><br/>';
}
if ($config_reg[lostid_link]=='True')
{
$lostid_link='&nbsp;<a href="registration/main.php?menuaction=registration.boreg.lostid1">'.lang('Lost Login Id').'</a><br/>';
}
/* if at least one option of "registration" is activated display the registration section */
if($config_reg[register_link]=='True' || $config_reg[lostpassword_link]=='True' || $config_reg[lostid_link]=='True')
{
$tmpl->set_var('register_link',$reg_link);
$tmpl->set_var('lostpassword_link',$lostpw_link);
$tmpl->set_var('lostid_link',$lostid_link) ;
//$tmpl->set_var('registration_url',$GLOBALS['phpgw_info']['server']['webserver_url'] . '/registration/');
}
else
{
/* trick to make registration section disapear */
$tmpl->set_block('login_form','registration');
$tmpl->set_var('registration','');
}
}
$GLOBALS['phpgw_info']['server']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
$tmpl->set_var('register_link',$reg_link);
$tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset());
$tmpl->set_var('login_url', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/login.php' . $extra_vars);
$tmpl->set_var('registration_url',$GLOBALS['phpgw_info']['server']['webserver_url'] . '/registration/');
$tmpl->set_var('version',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
$tmpl->set_var('cd',check_logoutcode($_GET['cd']));
$tmpl->set_var('cookie',$last_loginid);
@ -379,6 +406,8 @@
$var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org';
$tmpl->set_var($var);
/* language section if activated in site config */
if (@$GLOBALS['phpgw_info']['server']['login_show_language_selection'])
{
$select_lang = '<select name="lang" onchange="'."location.href=location.href+(location.search?'&':'?')+'lang='+this.value".'">';
@ -396,6 +425,7 @@
}
else
{
/* trick to make language section disapear */
$tmpl->set_block('login_form','language_select');
$tmpl->set_var('language_select','');
}

View File

@ -12,13 +12,6 @@
<title>{website_title} - Login</title>
<style type="text/css">
/*body
{
height:100%;
}
*/
#divMain
{
height:85%;
@ -74,13 +67,18 @@
<tr >
<td class="divSideboxEntry">
<table cellspacing="2" cellpadding="0" width="100%" border="0">
<table cellspacing="3" cellpadding="0" width="100%" border="0">
<tr>
<td colspan="4" align="left">
<td colspan="4" align="center">
&nbsp;
</td>
</tr>
<!-- <tr>
<td colspan="3" align="center">
{register_link}<br/>
<img width="200" height="1" src="phpgwapi/templates/{template_set}/images/spacer.gif" alt="spacer" />
</td>
</tr>
</tr>-->
<tr>
<td colspan="3">
<input type="hidden" name="passwd_type" value="text">
@ -97,21 +95,22 @@
</tr>
<!-- END language_select -->
<tr>
<td align="right">{lang_username}:&nbsp;</td>
<td align="left"><input name="login" value="{cookie}" style="width: 100px; border: 1px solid silver;"></td>
<td align="right" tablindex="1">{lang_select_domain}:&nbsp;</td>
<td align="left">{select_domain}</td>
<td align="left"></td>
</tr>
<tr>
<td align="right" tablindex="1">{lang_username}:&nbsp;</td>
<td align="left"><input name="login" value="{cookie}" style="width: 100px; border: 1px solid silver;"></td>
<td align="left"><!--{select_domain}--></td>
</tr>
<tr>
<td align="right">{lang_password}:&nbsp;</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>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center">
<input type="submit" value="{lang_login}" name="submitit" style="border: 1px solid silver;">
<td colspan="2" align="center" style="margin-top:5px;">
<input type="submit" value="{lang_login}" name="submitit" style="border: 1px solid silver;width:100px;">
</td>
</tr>
<tr>
@ -119,6 +118,14 @@
&nbsp;
</td>
</tr>
<!-- BEGIN registration -->
<tr>
<td colspan="4" align="left">
<table style="margin-top:0px;margin-bottom:0px;width:360;"><tr><td width="1%" nowrap="nowrap">{lostpassword_link}</td><td colspan="1" align="left">{lostid_link}</td></tr></table>
<table style="margin:0px;padding:0px;width:360;border-top:solid 1px #cccccc"><tr><td>{register_link}</td></tr></table>
</td>
</tr>
<!-- END registration -->
</table>
</td>