From 8db55de4f034e0e54a429220b3bbe35156fb7c99 Mon Sep 17 00:00:00 2001 From: Jakob Hilden Date: Sun, 12 Apr 2009 17:52:26 +0000 Subject: changed order of form fields in photo and album forms so that the confusing "name" field is not on top anymore changed "name" label to "Filename" for photos and "Directory Name" for albums --- core/helpers/album.php | 9 +++++---- core/helpers/photo.php | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'core/helpers') diff --git a/core/helpers/album.php b/core/helpers/album.php index db816470..09385a19 100644 --- a/core/helpers/album.php +++ b/core/helpers/album.php @@ -69,9 +69,9 @@ class album_Core { static function get_add_form($parent) { $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddAlbumForm")); $group = $form->group("add_album")->label(t("Add an album to %album_title", array("album_title" => $parent->title))); - $group->input("name")->label(t("Name")); $group->input("title")->label(t("Title")); $group->textarea("description")->label(t("Description")); + $group->input("name")->label(t("Directory Name")); $group->hidden("type")->value("album"); $group->submit("")->value(t("Create")); $form->add_rules_from(ORM::factory("item")); @@ -82,11 +82,12 @@ class album_Core { $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gEditAlbumForm")); $form->hidden("_method")->value("put"); $group = $form->group("edit_album")->label(t("Edit Album")); - if ($parent->id != 1) { - $group->input("name")->label(t("Name"))->value($parent->name); - } + $group->input("title")->label(t("Title"))->value($parent->title); $group->textarea("description")->label(t("Description"))->value($parent->description); + if ($parent->id != 1) { + $group->input("name")->label(t("Directory Name"))->value($parent->name); + } $sort_order = $group->group("sort_order", array("id" => "gAlbumSortOrder")) ->label(t("Sort Order")); diff --git a/core/helpers/photo.php b/core/helpers/photo.php index a6934286..4f75ca0d 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -110,9 +110,9 @@ class photo_Core { $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddPhotoForm")); $group = $form->group("add_photo")->label( t("Add Photo to %album_title", array("album_title" =>$parent->title))); - $group->input("name")->label(t("Name")); $group->input("title")->label(t("Title")); $group->textarea("description")->label(t("Description")); + $group->input("name")->label(t("Filename")); $group->upload("file")->label(t("File"))->rules("required|allow[jpg,png,gif,flv,mp4]"); $group->hidden("type")->value("photo"); $group->submit("")->value(t("Upload")); @@ -124,9 +124,9 @@ class photo_Core { $form = new Forge("photos/$photo->id", "", "post", array("id" => "gEditPhotoForm")); $form->hidden("_method")->value("put"); $group = $form->group("edit_photo")->label(t("Edit Photo")); - $group->input("name")->label(t("Name"))->value($photo->name); $group->input("title")->label(t("Title"))->value($photo->title); $group->textarea("description")->label(t("Description"))->value($photo->description); + $group->input("name")->label(t("Filename"))->value($photo->name); $group->submit("")->value(t("Modify")); $form->add_rules_from(ORM::factory("item")); return $form; -- cgit v1.2.3