From: guiguidoc Date: Thu, 6 Oct 2005 14:31:41 +0000 (+0000) Subject: add dropdown with preferred language for the mediawiki authorization X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=930e81b9f07b2bd5737d28c3a26b5451e61d3e43;p=gosa.git add dropdown with preferred language for the mediawiki authorization git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1516 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 8749a6627..2df705419 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -45,6 +45,7 @@ class user extends plugin var $dob= "0"; var $use_dob= "0"; var $gender= "0"; + var $preferredLanguage= ""; var $jpegPhoto= "*removed*"; var $photoData= ""; @@ -82,7 +83,7 @@ class user extends plugin /* attribute list for save action */ var $attributes= array("sn", "givenName", "uid", "personalTitle", "academicTitle", - "homePostalAddress", "homePhone", "labeledURI", "o", "ou", "dob", "gender", + "homePostalAddress", "homePhone", "labeledURI", "o", "ou", "dob", "gender","preferredLanguage", "departmentNumber", "employeeNumber", "employeeType", "l", "st", "roomNumber", "telephoneNumber", "mobile", "pager", "cn", "userPKCS12", "postalAddress", "facsimileTelephoneNumber", "userSMIMECertificate"); @@ -247,6 +248,10 @@ class user extends plugin $sex= array(0 => " ", "F" => _("female"), "M" => _("male")); $smarty->assign("gender_list", $sex); + /* Assign prefered langage */ + $language= array(0 => " ", "fr_FR" => _("fr_FR"), "en_EN" => _("en_EN"), "de_DE" => _("de_DE"), "it_IT" => _("it_IT")); + $smarty->assign("preferredLanguage_list", $language); + /* Get random number for pictures */ srand((double)microtime()*1000000); $smarty->assign("rand", rand(0, 10000)); @@ -661,6 +666,13 @@ class user extends plugin $this->attrs["gender"]= array(); } } + if ($this->preferredLanguage == "0"){ + if ($this->new) { + unset($this->attrs["preferredLanguage"]); + } else { + $this->attrs["preferredLanguage"]= array(); + } + } /* Special handling for attribute jpegPhote needed, scale image via image magick to 147x200 pixels and inject resulting data. */ diff --git a/plugins/personal/generic/generic.tpl b/plugins/personal/generic/generic.tpl index d4592e39e..1614fa0cb 100644 --- a/plugins/personal/generic/generic.tpl +++ b/plugins/personal/generic/generic.tpl @@ -86,6 +86,16 @@ + + + + + + + +