From f85bc9cd529a550c267d786a04882fcefa0d536c Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Tue, 28 Sep 2004 08:51:50 +0000 Subject: [PATCH] Applied patch from Jeff Kymer, Add extra documentation in login.php Make better lay-out in login.tpl --- login.php | 38 ++++++++++++++++++--- phpgwapi/templates/idots/login.tpl | 53 +++++++++++++++++------------- 2 files changed, 64 insertions(+), 27 deletions(-) diff --git a/login.php b/login.php index 67437824dd..b18d02219a 100755 --- a/login.php +++ b/login.php @@ -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') { - $reg_link=' '.lang('Not a user yet? Register now').'
'; + if ($config_reg[register_link]=='True') + { + $reg_link=' '.lang('Not a user yet? Register now').'
'; + } + if ($config_reg[lostpassword_link]=='True') + { + $lostpw_link=' '.lang('Lost password').'
'; + } + if ($config_reg[lostid_link]=='True') + { + $lostid_link=' '.lang('Lost Login Id').'
'; + } + + /* 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 = ' @@ -96,29 +94,38 @@ {select_language} - - {lang_username}:  - + + {lang_select_domain}:  {select_domain} + + + + {lang_username}:  + + {lang_password}:  -   -   - - - - + + - -   - - + +   + + + + + +
{lostpassword_link}{lostid_link}
+
{register_link}
+ + +