diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-28 21:33:25 +0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-28 21:39:05 +0800 |
commit | f5c4d23e5756c460099f04ca5a57c0002292d9da (patch) | |
tree | f4f02b3e097b9c87f540680a3777fc9b2f089f10 /modules | |
parent | a7f4d7aced009007d36e48685648e9bc3382f8cb (diff) |
Convert the album add dialog to use the new Form_Script library
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/controllers/albums.php | 5 | ||||
-rw-r--r-- | modules/gallery/helpers/album.php | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 56b74cb1..cdfa823d 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -122,7 +122,7 @@ class Albums_Controller extends Items_Controller { print json_encode( array( "result" => "error", - "form" => $form->__toString() . html::script("modules/gallery/js/albums_form_add.js"))); + "form" => $form->__toString())); } } @@ -216,8 +216,7 @@ class Albums_Controller extends Items_Controller { switch ($this->input->get("type")) { case "album": - print album::get_add_form($album) . - html::script("modules/gallery/js/albums_form_add.js"); + print album::get_add_form($album); break; case "photo": diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index 6065f580..8a7c9951 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -90,6 +90,8 @@ class album_Core { $group->hidden("type")->value("album"); $group->submit("")->value(t("Create")); $form->add_rules_from(ORM::factory("item")); + $form->script("") + ->url(url::abs_file("modules/gallery/js/albums_form_add.js")); return $form; } |