From ebb0761b8dd10e804c017e8a0d25413796916d72 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 00:32:24 -0700 Subject: Label the tag input field according to the item type. Fixes ticket #176. --- modules/tag/helpers/tag.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules/tag/helpers') diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 0ca02b42..7c4b56ba 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -81,8 +81,12 @@ class tag_Core { static function get_add_form($item) { $form = new Forge("tags", "", "post", array("id" => "gAddTagForm")); - $group = $form->group("add_tag")->label(t("Add Tag")); - $group->input("name")->label(t("Add tag"))->rules("required|length[1,64]"); + $label = $item->is_album() ? + t("Add tag to album") : + ($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie")); + + $group = $form->group("add_tag")->label("Add Tag"); + $group->input("name")->label($label)->rules("required|length[1,64]"); $group->hidden("item_id")->value($item->id); $group->submit("")->value(t("Add Tag")); return $form; -- cgit v1.2.3