Skip to content

Commit

Permalink
Add internationalized error messages for adding and editing groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Jul 20, 2010
1 parent 6ed6382 commit 112582d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/user/controllers/admin_users.php
Expand Up @@ -371,8 +371,10 @@ private function _get_group_edit_form_admin($group) {
$form = new Forge("admin/users/edit_group/$group->id", "", "post", array("id" => "g-edit-group-form"));
$form_group = $form->group("edit_group")->label(t("Edit group"));
$form_group->input("name")->label(t("Name"))->id("g-name")->value($group->name);
$form_group->inputs["name"]->error_messages(
"conflict", t("There is already a group with that name"));
$form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name"))
->error_messages("required", t("You must enter a group name"))
->error_messages("length", t("The group name must be at least %min_length characters",
array("min_length" => 4)));
$form_group->submit("")->value(t("Save"));
return $form;
}
Expand All @@ -381,8 +383,10 @@ private function _get_group_add_form_admin() {
$form = new Forge("admin/users/add_group", "", "post", array("id" => "g-add-group-form"));
$form_group = $form->group("add_group")->label(t("Add group"));
$form_group->input("name")->label(t("Name"))->id("g-name");
$form_group->inputs["name"]->error_messages(
"conflict", t("There is already a group with that name"));
$form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name"))
->error_messages("required", t("You must enter a group name"))
->error_messages("length", t("The group name must be at least %min_length characters",
array("min_length" => 4)));
$form_group->submit("")->value(t("Add group"));
return $form;
}
Expand Down

0 comments on commit 112582d

Please sign in to comment.