From 785f5bbf355f2c251a091be5a84af0c5dccb5c57 Mon Sep 17 00:00:00 2001 From: james Date: Sat, 28 Nov 2009 20:07:02 +0000 Subject: [PATCH] Show display and save the "preferred language" field. --- user.inc.php | 2 +- user_personal.php | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/user.inc.php b/user.inc.php index fc4bc798..b243eb46 100644 --- a/user.inc.php +++ b/user.inc.php @@ -418,7 +418,7 @@ function user_save(&$u) 'email', 'phonehome','phonework','phonecell','fax','organization', 'address','address2','city','province','postalcode','sex', - 'firstaid', 'cpr', 'types'); + 'firstaid', 'cpr', 'types','lang'); $set = ""; foreach($fields as $f) { diff --git a/user_personal.php b/user_personal.php index eff1b4b2..8e03b8f6 100644 --- a/user_personal.php +++ b/user_personal.php @@ -43,6 +43,7 @@ 'address' => array('name' => 'Address 1'), 'address2' => array('name' => 'Address 2'), 'city' => array('name' => 'City'), + 'lang' => array('name' => 'Preferred Language'), 'province' => array('name' => $config['provincestate']), 'organization' => array('name' => 'Organization'), 'sex' => array('name' => 'Gender'), @@ -101,7 +102,6 @@ if($eid != $_SESSION['users_id']) { $fields[] = 'password'; } - switch($_GET['action']) { case 'save': $users_id = intval($_POST['users_id']); @@ -322,6 +322,25 @@ echo "\n"; item($u, 'firstaid'); item($u, 'cpr'); echo ""; +echo "\n"; + if(in_array('lang', $fields)) { + echo ''.i18n('Preferred Lang').': '; + echo ''; + echo ""; + if(in_array('lang', $required)) echo REQUIREDFIELD; + echo ''; + } else { + echo ''; + } +echo ""; +echo ""; + echo "
";