diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index 13cdc8d7f..a6792d84a 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -331,24 +331,10 @@ class ScheduleController extends Zend_Controller_Action public function editShowAction() { - $formWhat = new Application_Form_AddShowWhat(); - $formWhat->removeDecorator('DtDdWrapper'); - $formWho = new Application_Form_AddShowWho(); - $formWho->removeDecorator('DtDdWrapper'); - $formWhen = new Application_Form_AddShowWhen(); - $formWhen->removeDecorator('DtDdWrapper'); - $formRepeats = new Application_Form_AddShowRepeats(); - $formRepeats->removeDecorator('DtDdWrapper'); - $formStyle = new Application_Form_AddShowStyle(); - $formStyle->removeDecorator('DtDdWrapper'); + $showInstanceId = $this->_getParam('id'); + $showInstance = new ShowInstance($showInstanceId); - $this->view->what = $formWhat; - //$this->view->when = $formWhen; - //$this->view->repeats = $formRepeats; - $this->view->who = $formWho; - $this->view->style = $formStyle; - - $this->view->dialog = $this->view->render('schedule/edit-show.phtml'); + $show = new Show($showInstance->getShowId()); } diff --git a/application/models/Shows.php b/application/models/Shows.php index 6d6ee9356..20a3a122b 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -11,16 +11,44 @@ class Show { public function getName() { $show = CcShowQuery::create()->findPK($this->_showId); - return $show->getDbName(); } public function setName($name) { $show = CcShowQuery::create()->findPK($this->_showId); - $show->setDbName($name); } + public function getDescription() { + $show = CcShowQuery::create()->findPK($this->_showId); + return $show->getDbDescription(); + } + + public function setDescription($description) { + $show = CcShowQuery::create()->findPK($this->_showId); + $show->setDbDescription($description); + } + + public function getColor() { + $show = CcShowQuery::create()->findPK($this->_showId); + return $show->getDbColor(); + } + + public function setColor($color) { + $show = CcShowQuery::create()->findPK($this->_showId); + $show->setDbColor($color); + } + + public function getBackgroundColor() { + $show = CcShowQuery::create()->findPK($this->_showId); + return $show->getDbBackgroundColor(); + } + + public function setBackgroundColor($backgroundColor) { + $show = CcShowQuery::create()->findPK($this->_showId); + $show->setDbBackgroundColor($backgroundColor); + } + //end dates are non inclusive. public static function addShow($data) { diff --git a/application/views/scripts/form/add-show-checkbox.phtml b/application/views/scripts/form/add-show-checkbox.phtml index 2d7f95bd1..f1012d1c7 100644 --- a/application/views/scripts/form/add-show-checkbox.phtml +++ b/application/views/scripts/form/add-show-checkbox.phtml @@ -10,5 +10,5 @@ - formErrors($this->element->getMessages()) ?> + element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?> diff --git a/application/views/scripts/form/add-show-style.phtml b/application/views/scripts/form/add-show-style.phtml index 7ab679a6f..86f42ff24 100644 --- a/application/views/scripts/form/add-show-style.phtml +++ b/application/views/scripts/form/add-show-style.phtml @@ -9,8 +9,5 @@ $this->element->getAttribs() ) ?> - element->hasErrors()) { - echo $this->formErrors($this->element->getMessages()); - } - ?> + element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?> diff --git a/application/views/scripts/schedule/add-show-dialog.phtml b/application/views/scripts/schedule/add-show-dialog.phtml index dc152e89e..aba2daf40 100644 --- a/application/views/scripts/schedule/add-show-dialog.phtml +++ b/application/views/scripts/schedule/add-show-dialog.phtml @@ -1,31 +1,29 @@