From 56d6430de257b468faa4af3d90fb95568dc0ba58 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 11 Jul 2004 09:42:54 +0000 Subject: [PATCH] moved (optional) language selection befor the user-name and automaticaly reload the page, if the user changed the language --- login.php | 8 ++++++-- phpgwapi/templates/idots/login.tpl | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/login.php b/login.php index b0176936ee..c0acc4bb12 100755 --- a/login.php +++ b/login.php @@ -258,7 +258,11 @@ $GLOBALS['phpgw_info']['user']['preferences'] = $prefs->read_repository(); } } - if(!isset($_COOKIE['last_loginid']) || !$prefs->account_id) + if ($_GET['lang']) + { + $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $_GET['lang']; + } + elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id) { // If the lastloginid cookies isn't set, we will default to the first language, // the users browser accepts. @@ -377,7 +381,7 @@ if (@$GLOBALS['phpgw_info']['server']['login_show_language_selection']) { - $select_lang = ''; $langs = $GLOBALS['phpgw']->translation->get_installed_langs(); uasort($langs,'strcasecmp'); foreach ($langs as $key => $name) // if we have a translation use it diff --git a/phpgwapi/templates/idots/login.tpl b/phpgwapi/templates/idots/login.tpl index a1363f525b..37752544cd 100755 --- a/phpgwapi/templates/idots/login.tpl +++ b/phpgwapi/templates/idots/login.tpl @@ -69,14 +69,14 @@ - + -
{website_title}{website_title}
- +
- @@ -86,11 +86,9 @@ - - - - - + @@ -98,30 +96,32 @@ + + + + + - + - -
+ {register_link}
spacer
{lang_username}: {select_domain} + +
{select_language}
{lang_username}: {select_domain}
{lang_password}:   
  
+
+  
- keys -