summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-12-02 21:25:15 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-12-02 21:25:15 +0000
commit3953dde2c698d89810661435b2602fbdb55c322e (patch)
tree37da3672e8d84d26b90a913a4c5ef0c7a3053829 /core/helpers
parentea11562e3270764a1083b0b7e236be5331626504 (diff)
The rearrange module will now add an album if you drag the "new album" onto the album tree. I haven't had a chance to figure out why the form does get any styling or why a textarea is no included as a list item.
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/album.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/helpers/album.php b/core/helpers/album.php
index dd62d693..3e77d521 100644
--- a/core/helpers/album.php
+++ b/core/helpers/album.php
@@ -58,4 +58,17 @@ class album_Core {
return $album;
}
+
+ static function get_add_form($parent) {
+ $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddAlbumForm"));
+ $group = $form->group(_("Add Album to {$parent->title}"));
+ $group->input("name");
+ $group->input("title");
+ $group->input("description");
+ $group->hidden("type")->value("album");
+ $group->submit(_("Create"));
+ $form->add_rules_from(ORM::factory("item"));
+ return $form;
+
+ }
}