Convert Admin_Users_Controller, User_Model and Group_Model to use

model based validation.
This commit is contained in:
Bharat Mediratta
2010-01-16 21:15:12 -08:00
parent a691dcc63c
commit 6a4dda9bde
5 changed files with 103 additions and 103 deletions
+8 -9
View File
@@ -95,14 +95,13 @@ class Users_Controller extends Controller {
foreach ($locales as $locale => $display_name) {
$locales[$locale] = SafeString::of_safe_html($display_name);
}
if (count($locales) > 1) {
// Put "none" at the first position in the array
$locales = array_merge(array("" => t("« none »")), $locales);
$selected_locale = ($user && $user->locale) ? $user->locale : "";
$form->dropdown("locale")
->label(t("Language Preference"))
->options($locales)
->selected($selected_locale);
}
// Put "none" at the first position in the array
$locales = array_merge(array("" => t("« none »")), $locales);
$selected_locale = ($user && $user->locale) ? $user->locale : "";
$form->dropdown("locale")
->label(t("Language Preference"))
->options($locales)
->selected($selected_locale);
}
}