From 3953dde2c698d89810661435b2602fbdb55c322e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 2 Dec 2008 21:25:15 +0000 Subject: 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. --- core/helpers/album.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/helpers') 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; + + } } -- cgit v1.2.3