public function indexAction()
 {
     $showForm = new Show_Form();
     $showForm->removeElement('description');
     $showForm->setAction($this->baseUrl . '/mod_slideshow/show/create');
     $submit = $showForm->getElement('submit');
     $submit->setLabel($this->view->getTranslation('Create Slideshow'));
     $this->view->form = $showForm;
     $mdlSlideshow = new Slideshow_Show();
     $this->view->slideshows = $mdlSlideshow->getShows();
 }
 public function editAction()
 {
     $form = new Show_Form();
     $mdlShow = new Slideshow_Show();
     if ($this->_request->isPost() && $form->isValid($_POST) && $this->_request->getParam('isInsert') != true) {
         $values = $form->getValues();
         $results = $mdlShow->updateShow($values['id'], $values['name'], $values['description']);
         $show = $results->page;
     } else {
         $id = $this->_request->getParam('id');
         $show = $mdlShow->find($id)->current();
         $form->populate($show->toArray());
     }
     $form->setAction($this->baseUrl . '/mod_slideshow/show/edit');
     $submit = $form->getElement('submit');
     $submit->setLabel($this->view->getTranslation('Update Slideshow'));
     $this->view->form = $form;
     $this->view->show = $show;
     $mdlSlide = new Slideshow_Slide();
     $this->view->slides = $mdlSlide->getSlides($show->id);
     $slideForm = new Slide_Form();
     $slideForm->removeElement('image');
     $slideForm->removeElement('imagepath');
     $slideForm->removeElement('previewpath');
     $slideForm->removeElement('image_preview');
     $slideForm->removeElement('caption');
     $slideFormValues['show_id'] = $show->id;
     $slideForm->populate($slideFormValues);
     $slideForm->setAction($this->baseUrl . '/mod_slideshow/slide/create');
     $submit = $slideForm->getElement('submit');
     $submit->setLabel($this->view->getTranslation('Add New Slide'));
     $this->view->slideForm = $slideForm;
     $this->view->breadcrumbs[$show->name] = $this->baseUrl . '/mod_slideshow/show/edit/id/' . $show->id;
     $this->view->toolbarLinks['Add to my bookmarks'] = $this->baseUrl . '/admin/index/bookmark/url/mod_slideshow/show/edit/id/' . $show->id;
     $this->view->toolbarLinks['Delete'] = $this->baseUrl . '/mod_slideshow/show/delete/id/' . $show->id;
 }