From cbff78daa8a642e1800916f92e43202857c3b677 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 24 Jan 2009 17:26:47 +0000 Subject: Supply a form id on all forms. This id can be used by modules other than the originating module to provide additional functionality to the form. --- modules/tag/helpers/tag.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/tag/helpers') diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 7dec6809..faed5c51 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -76,7 +76,7 @@ class tag_Core { } static function get_add_form($item) { - $form = new Forge("tags", "", "post", array("id" => "gAddTagForm")); + $form = new Forge("tags", "", "post", array("id" => "gAdd_Tag_Form")); $group = $form->group("add_tag")->label(t("Add Tag")); $group->input("name")->label(t("Add tag")); $group->hidden("item_id")->value($item->id); @@ -86,7 +86,7 @@ class tag_Core { } static function get_rename_form($tag) { - $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "gRenameTagForm")); + $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "gRename_Tag_Form")); $group = $form->group("rename_tag")->label(t("Rename Tag")); $group->input("name")->label(t("Tag name"))->value($tag->name); $group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name")); @@ -96,8 +96,9 @@ class tag_Core { } static function get_delete_form($tag) { - $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "gDeleteTagForm")); - $group = $form->group("delete_tag")->label(t("Really delete tag %tag_name?", array("tag_name" => $tag->name))); + $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "gDelete_Tag_Form")); + $group = $form->group("delete_tag") + ->label(t("Really delete tag %tag_name?", array("tag_name" => $tag->name))); $group->submit("")->value(t("Delete Tag")); $form->add_rules_from(ORM::factory("tag")); return $form; -- cgit v1.2.3