summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-02-01 21:41:16 -0800
committerBharat Mediratta <bharat@menalto.com>2010-02-01 21:41:16 -0800
commit81a1df4a504fdd7cdbef2b92e2b1257a65da98f9 (patch)
tree361799720850b8a5e76e3a075b23dc9b5650ba0c
parent22ea03847ab8251a2f068b801599043014834e98 (diff)
Localize the name "conflict" validation error when creating a new album.
-rw-r--r--modules/gallery/helpers/album.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php
index 389f6e48..15e0c3ca 100644
--- a/modules/gallery/helpers/album.php
+++ b/modules/gallery/helpers/album.php
@@ -36,7 +36,8 @@ class album_Core {
$group->input("name")->label(t("Directory name"))
->error_messages("no_slashes", t("The directory name can't contain the \"/\" character"))
->error_messages("required", t("You must provide a directory name"))
- ->error_messages("length", t("Your directory name is too long"));
+ ->error_messages("length", t("Your directory name is too long"))
+ ->error_messages("conflict", t("There is already a movie, photo or album with this name"));
$group->input("slug")->label(t("Internet Address"))
->error_messages(
"not_url_safe",
@@ -51,7 +52,8 @@ class album_Core {
}
static function get_edit_form($parent) {
- $form = new Forge("albums/update/{$parent->id}", "", "post", array("id" => "g-edit-album-form"));
+ $form = new Forge(
+ "albums/update/{$parent->id}", "", "post", array("id" => "g-edit-album-form"));
$form->hidden("from_id");
$group = $form->group("edit_item")->label(t("Edit Album"));
@@ -61,8 +63,7 @@ class album_Core {
$group->textarea("description")->label(t("Description"))->value($parent->description);
if ($parent->id != 1) {
$group->input("name")->label(t("Directory Name"))->value($parent->name)
- ->error_messages(
- "conflict", t("There is already a movie, photo or album with this name"))
+ ->error_messages("conflict", t("There is already a movie, photo or album with this name"))
->error_messages("no_slashes", t("The directory name can't contain a \"/\""))
->error_messages("no_trailing_period", t("The directory name can't end in \".\""))
->error_messages("required", t("You must provide a directory name"))