summaryrefslogtreecommitdiff
path: root/modules/user/controllers/admin_users.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/controllers/admin_users.php')
-rw-r--r--modules/user/controllers/admin_users.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index 3c6cfd32..24478aa5 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -56,12 +56,12 @@ class Admin_Users_Controller extends Admin_Controller {
message::success(t("Created user %user_name", array("user_name" => $user->name)));
json::reply(array("result" => "success"));
} else {
- json::reply(array("result" => "error", "form" => (string) $form));
+ print json::reply(array("result" => "error", "html" => (string)$form));
}
}
public function add_user_form() {
- json::reply(array("form" => (string) $this->_get_user_add_form_admin()));
+ print $this->_get_user_add_form_admin();
}
public function delete_user($id) {
@@ -81,7 +81,7 @@ class Admin_Users_Controller extends Admin_Controller {
$name = $user->name;
$user->delete();
} else {
- json::reply(array("result" => "error", "form" => (string) $form));
+ json::reply(array("result" => "error", "html" => (string)$form));
}
$message = t("Deleted user %user_name", array("user_name" => $name));
@@ -95,7 +95,7 @@ class Admin_Users_Controller extends Admin_Controller {
if (empty($user)) {
throw new Kohana_404_Exception();
}
- json::reply(array("form" => (string) $this->_get_user_delete_form_admin($user)));
+ print $this->_get_user_delete_form_admin($user);
}
public function edit_user($id) {
@@ -136,7 +136,7 @@ class Admin_Users_Controller extends Admin_Controller {
message::success(t("Changed user %user_name", array("user_name" => $user->name)));
json::reply(array("result" => "success"));
} else {
- json::reply(array("result" => "error", "form" => (string) $form));
+ json::reply(array("result" => "error", "html" => (string) $form));
}
}
@@ -146,7 +146,7 @@ class Admin_Users_Controller extends Admin_Controller {
throw new Kohana_404_Exception();
}
- json::reply(array("form" => (string) $this->_get_user_edit_form_admin($user)));
+ print $this->_get_user_edit_form_admin($user);
}
public function add_user_to_group($user_id, $group_id) {
@@ -194,12 +194,12 @@ class Admin_Users_Controller extends Admin_Controller {
t("Created group %group_name", array("group_name" => $group->name)));
json::reply(array("result" => "success"));
} else {
- json::reply(array("result" => "error", "form" => (string) $form));
+ json::reply(array("result" => "error", "html" => (string)$form));
}
}
public function add_group_form() {
- json::reply(array("form" => (string) $this->_get_group_add_form_admin()));
+ print $this->_get_group_add_form_admin();
}
public function delete_group($id) {
@@ -215,7 +215,7 @@ class Admin_Users_Controller extends Admin_Controller {
$name = $group->name;
$group->delete();
} else {
- json::reply(array("result" => "error", "form" => (string) $form));
+ json::reply(array("result" => "error", "html" => (string) $form));
}
$message = t("Deleted group %group_name", array("group_name" => $name));
@@ -230,7 +230,7 @@ class Admin_Users_Controller extends Admin_Controller {
throw new Kohana_404_Exception();
}
- json::reply(array("form" => (string) $this->_get_group_delete_form_admin($group)));
+ print $this->_get_group_delete_form_admin($group);
}
public function edit_group($id) {
@@ -263,7 +263,7 @@ class Admin_Users_Controller extends Admin_Controller {
$group->reload();
message::error(
t("Failed to change group %group_name", array("group_name" => $group->name)));
- json::reply(array("result" => "error", "form" => (string) $form));
+ json::reply(array("result" => "error", "html" => (string) $form));
}
}
@@ -273,7 +273,7 @@ class Admin_Users_Controller extends Admin_Controller {
throw new Kohana_404_Exception();
}
- json::reply(array("form" => (string) $this->_get_group_edit_form_admin($group)));
+ print $this->_get_group_edit_form_admin($group);
}
/* User Form Definitions */
@@ -310,7 +310,7 @@ class Admin_Users_Controller extends Admin_Controller {
}
module::event("user_edit_form_admin", $user, $form);
- $group->submit("")->value(t("Modify User"));
+ $group->submit("")->value(t("Modify user"));
return $form;
}
@@ -355,7 +355,7 @@ class Admin_Users_Controller extends Admin_Controller {
$locales = array_merge(array("" => t("« none »")), $locales);
$selected_locale = ($user && $user->locale) ? $user->locale : "";
$form->dropdown("locale")
- ->label(t("Language Preference"))
+ ->label(t("Language preference"))
->options($locales)
->selected($selected_locale);
}