diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-01-14 15:01:50 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-01-14 15:01:50 +0100 |
commit | 6ff0e668a4158f9ba2c7bd9509c48f1681259da2 (patch) | |
tree | a79d7a8723a205050aef7f1b3c2ce5377d5a3ede | |
parent | c6c325b562ac030bdaadb69793781c6f6c36a73f (diff) | |
download | ratatoeskr-cms-6ff0e668a4158f9ba2c7bd9509c48f1681259da2.tar.gz ratatoeskr-cms-6ff0e668a4158f9ba2c7bd9509c48f1681259da2.tar.bz2 ratatoeskr-cms-6ff0e668a4158f9ba2c7bd9509c48f1681259da2.zip |
We can now change the language of a user.
-rw-r--r-- | ratatoeskr/backend.php | 4 | ||||
-rw-r--r-- | ratatoeskr/templates/src/systemtemplates/user.html | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index 5d736b3..78ef83c 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -1474,6 +1474,7 @@ $backend_subactions = url_action_subactions(array( { $user->fullname = $_POST["fullname"]; $user->mail = $_POST["mail"]; + $user->language = $_POST["lang"]; $current_groups = array_map(function($g) { return $g->get_id(); }, $user->get_groups()); $new_groups = empty($_POST[groups_multiselect]) ? array() : $_POST["groups_multiselect"]; @@ -1528,7 +1529,8 @@ $backend_subactions = url_action_subactions(array( "id" => $user->get_id(), "name" => $user->username, "fullname" => $user->fullname, - "mail" => $user->mail + "mail" => $user->mail, + "lang" => $user->language ); $ste->vars["groups"] = array_map(function($g) use ($user) { return array( "id" => $g->get_id(), diff --git a/ratatoeskr/templates/src/systemtemplates/user.html b/ratatoeskr/templates/src/systemtemplates/user.html index a083e47..30f06fd 100644 --- a/ratatoeskr/templates/src/systemtemplates/user.html +++ b/ratatoeskr/templates/src/systemtemplates/user.html @@ -13,6 +13,14 @@ <strong><ste:get_translation for="mail_address" />:</strong><br /> <input type="text" name="mail" value="$u[mail]" /> </p> + <p> + <strong><ste:get_translation for="language" />:</strong><br /> + <select name="lang"> + <ste:foreach array="all_languages" key="langcode" value="langname"> + <option value="$langcode"?{~{$langcode|eq|$u[lang]}| selected="selected"|}>$langcode: <ste:escape>$langname</ste:escape></option> + </ste:foreach> + </select> + </p> <p><strong><ste:get_translation for="member_of_groups" />:</strong></p> <ul class="bulletfree"> <ste:foreach array="groups" value="group"> |