-CC-1805 Ability to edit a show

Initial check-in...still incomplete.
This commit is contained in:
martin 2011-04-12 00:14:26 -04:00
parent eed8c95343
commit b4f1a6b3b0
11 changed files with 616 additions and 77 deletions

View file

@ -57,15 +57,17 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
public function checkReliantFields($formData) {
$start_timestamp = $formData['add_show_start_date'];
$end_timestamp = $formData['add_show_end_date'];
if (!$formData['add_show_no_end']){
$start_timestamp = $formData['add_show_start_date'];
$end_timestamp = $formData['add_show_end_date'];
$start_epoch = strtotime($start_timestamp);
$end_epoch = strtotime($end_timestamp);
$start_epoch = strtotime($start_timestamp);
$end_epoch = strtotime($end_timestamp);
if($end_epoch < $start_epoch) {
$this->getElement('add_show_end_date')->setErrors(array('End date must be after start date'));
return false;
if($end_epoch < $start_epoch) {
$this->getElement('add_show_end_date')->setErrors(array('End date must be after start date'));
return false;
}
}
return true;

View file

@ -5,6 +5,12 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
public function init()
{
// Hidden element to indicate whether the show is new or
// whether we are updating an existing show.
$this->addElement('hidden', 'add_show_id', array(
'decorators' => array('ViewHelper')
));
// Add name element
$this->addElement('text', 'add_show_name', array(
'label' => 'Name:',