diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-28 00:32:24 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-28 00:32:24 -0700 |
commit | ebb0761b8dd10e804c017e8a0d25413796916d72 (patch) | |
tree | 9d4be447a6de4bb5c42df7d8e65887e1b228d801 | |
parent | df51ea7fa4977922a73af8b7219fff62031f52d4 (diff) |
Label the tag input field according to the item type.
Fixes ticket #176.
-rw-r--r-- | modules/tag/helpers/tag.php | 8 |
1 files changed, 6 insertions, 2 deletions
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; |