Work on adding image upload to add-show form

This commit is contained in:
Duncan Sommerville 2014-09-12 18:05:24 -04:00
parent cc3ddb40ea
commit cb80423fdd
8 changed files with 151 additions and 58 deletions

View file

@ -481,7 +481,7 @@ class ScheduleController extends Zend_Controller_Action
$this->view->addNewShow = true;
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
} else {
} else {
if (!$validateStartDate) {
$this->view->when->getElement('add_show_start_date')->setOptions(array('disabled' => true));
}
@ -554,7 +554,7 @@ class ScheduleController extends Zend_Controller_Action
{
$service_showForm = new Application_Service_ShowFormService(null);
//$service_show = new Application_Service_ShowService();
$js = $this->_getParam('data');
$data = array();
@ -579,21 +579,24 @@ class ScheduleController extends Zend_Controller_Action
$log_vars["params"] = array();
$log_vars["params"]["form_data"] = $data;
Logging::info($log_vars);
$request = $this->getRequest();
Logging::info($request);
$forms = $this->createShowFormAction();
$this->view->addNewShow = true;
if ($service_showForm->validateShowForms($forms, $data)) {
$service_show->addUpdateShow($data);
$service_show->addUpdateShow($data);
//send new show forms to the user
$this->createShowFormAction(true);
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
Logging::debug("Show creation succeeded");
} else {
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
Logging::debug("Show creation failed");
}
}