public function configure()
 {
     $this->setWidgets(array('client_service_type' => new sfWidgetFormChoice(array('choices' => ClientServicePeer::getClassKeys())), 'employee_id' => new sfWidgetFormInputHidden(), 'date' => new sfWidgetFormJQueryDate(array('image' => '/images/calendar.png', 'config' => '{}', 'days' => nckTools::generateTwoCharsRange(1, 31), 'months' => nckTools::generateTwoCharsRange(1, 12)), array('class' => 'date'))));
     $this->widgetSchema->setLabels(array('client_service_type' => 'Voucher Type', 'employee_id' => 'Employee', 'date' => 'Vouchers as of Date'));
     $this->setValidators(array('client_service_type' => new sfValidatorPass(), 'employee_id' => new sfValidatorPass(), 'date' => new sfValidatorPass()));
     $this->widgetSchema->setNameFormat('voucher[%s]');
     $this->widgetSchema->setFormFormatterName('list');
 }
Example #2
0
 public function configure()
 {
     $this->setWidgets(array('from_date' => new sfWidgetFormJQueryDate(array('image' => '/images/calendar.png', 'config' => '{}', 'days' => nckTools::generateTwoCharsRange(1, 31), 'months' => nckTools::generateTwoCharsRange(1, 12)), array('class' => 'date')), 'to_date' => new sfWidgetFormJQueryDate(array('image' => '/images/calendar.png', 'config' => '{}', 'days' => nckTools::generateTwoCharsRange(1, 31), 'months' => nckTools::generateTwoCharsRange(1, 12)), array('class' => 'date'))));
     $this->widgetSchema->setLabels(array('from_date' => 'From Date', 'to_date' => 'To Date'));
     $this->setValidators(array('from_date' => new sfValidatorPass(), 'to_date' => new sfValidatorPass()));
     $this->setDefaults(array('from_date' => strtotime('this month'), 'to_date' => strtotime('this month')));
     $this->widgetSchema->setNameFormat('rs2[%s]');
     $this->widgetSchema->setFormFormatterName('list');
 }
Example #3
0
 public function executeAjaxGetObjectives(sfWebRequest $request)
 {
     $aoc = AreaOfConcernPeer::retrieveByPK($request->getParameter('id'));
     $objectives = $aoc->getObjectives();
     $objectives = nckTools::asArray($objectives);
     $result = array('target' => $request->getParameter('target'), 'options' => $objectives);
     return $this->jsonify($result);
 }
Example #4
0
 public function getCellPhoneFormatted()
 {
     return nckTools::format_phone($this->getCellPhone());
 }