Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
denise 2012-04-12 12:01:55 -04:00
commit b0948e8848
8 changed files with 340 additions and 251 deletions

View file

@ -14,6 +14,12 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
'decorators' => array('ViewHelper')
));
// Hidden element to indicate the instance id of the show
// being edited.
$this->addElement('hidden', 'add_show_instance_id', array(
'decorators' => array('ViewHelper')
));
// Add name element
$this->addElement('text', 'add_show_name', array(
'label' => 'Name:',

View file

@ -83,7 +83,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
}
public function checkReliantFields($formData, $startDateModified) {
public function checkReliantFields($formData, $validateStartDate) {
$valid = true;
$start_time = $formData['add_show_start_date']." ".$formData['add_show_start_time'];
@ -92,7 +92,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$nowDateTime = new DateTime();
$showStartDateTime = new DateTime($start_time);
if ((($formData['add_show_id'] != -1) && $startDateModified) || ($formData['add_show_id'] == -1)){
if ($validateStartDate){
if($showStartDateTime->getTimestamp() < $nowDateTime->getTimestamp()) {
$this->getElement('add_show_start_time')->setErrors(array('Cannot create show in the past'));
$valid = false;