diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-01-24 17:26:47 +0000 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-01-24 17:26:47 +0000 |
| commit | cbff78daa8a642e1800916f92e43202857c3b677 (patch) | |
| tree | 1cb8302d4da07fbb384d44d94644088c718c6339 /modules/tag/helpers | |
| parent | eed57674f99621e5354a13543067e9556eb9c6d0 (diff) | |
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.
Diffstat (limited to 'modules/tag/helpers')
| -rw-r--r-- | modules/tag/helpers/tag.php | 9 |
1 files changed, 5 insertions, 4 deletions
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; |
