- Timestamp:
- 07/30/10 16:44:58 (19 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostropheBlogPlugin/trunk/lib/form/doctrine/PluginaEventForm.class.php
r1576 r1866 19 19 parent::setup(); 20 20 21 $this->setWidget('start_date', new sfWidgetFormJQueryDate Time(22 array(' date' => array('image' => '/apostrophePlugin/images/a-icon-datepicker.png'))23 ) );24 25 $this->setValidator('start_date', new sfValidatorDate Time(21 $this->setWidget('start_date', new sfWidgetFormJQueryDate( 22 array('image' => '/apostrophePlugin/images/a-icon-datepicker.png')) 23 ); 24 25 $this->setValidator('start_date', new sfValidatorDate( 26 26 array( 27 27 'required' => true, 28 28 ))); 29 29 30 $this->setWidget('end_date', new sfWidgetFormJQueryDateTime( 31 array('date' => array('image' => '/apostrophePlugin/images/a-icon-datepicker.png')) 32 )); 30 $this->setWidget('start_time', new aWidgetFormJQueryTime(array(), array('size' => 8))); 31 $this->setValidator('start_time', new sfValidatorTime(array('required' => false, 'time_output' => 'g:iA'))); 33 32 34 $this->setValidator('end_date', new sfValidatorDateTime( 33 $this->setWidget('end_date', new sfWidgetFormJQueryDate( 34 array('image' => '/apostrophePlugin/images/a-icon-datepicker.png')) 35 ); 36 37 $this->setValidator('end_date', new sfValidatorDate( 35 38 array( 36 39 'required' => true, 37 40 ))); 38 41 39 if($this->getObject()->getStartDate() == $this->getObject()->getEndDate()) 40 { 41 $this->getWidget('start_date')->addOption('with_time', false); 42 $this->getWidget('end_date')->addOption('with_time', false); 43 } 42 $this->setWidget('end_time', new aWidgetFormJQueryTime(array(), array('size' => 8))); 43 $this->setValidator('end_time', new sfValidatorTime(array('required' => false, 'time_output' => 'g:iA'))); 44 44 45 45 $this->getWidgetSchema()->setDefault('start_date', date('Y/m/d'));

