diff options
Diffstat (limited to 'core/controllers')
-rw-r--r-- | core/controllers/photos.php | 9 | ||||
-rw-r--r-- | core/controllers/welcome.php | 14 |
2 files changed, 12 insertions, 11 deletions
diff --git a/core/controllers/photos.php b/core/controllers/photos.php index 143c3bb8..7a599f4b 100644 --- a/core/controllers/photos.php +++ b/core/controllers/photos.php @@ -35,4 +35,13 @@ class Photos_Controller extends Items_Controller { print $template; } + + /** + * @see Rest_Controller::_form_add($parameters) + */ + public function _form_add($parent_id) { + $parent = ORM::factory("item", $parent_id); + + print photo::get_add_form($parent)->render(); + } } diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index 7f1070ba..e61ae674 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -507,16 +507,8 @@ class Welcome_Controller extends Template_Controller { $this->auto_render = false; } - public function _get_add_photo_html() { - return ' - <fieldset> - <legend>Photos</legend> - <form method="post" action="' . url::site("albums/1") . '" enctype="multipart/form-data"> - <input type="submit" value="upload"/> - <input id="photo_upload" name="file[]" type="file"/> - <input type="hidden" name="type" value="photo"/> - </form> - </fieldset> - '; + public function _get_add_photo_html($parent_id=1) { + $parent = ORM::factory("item", $parent_id); + return photo::get_add_form($parent); } } |