コード例 #1
0
 public function configure()
 {
     parent::configure();
     $leaveTypeWidget = $this->getWidget('leave_type');
     $choices = $leaveTypeWidget->getOption('choices');
     if (!isset($choices[''])) {
         $choices = array('' => 'All') + $choices;
         $leaveTypeWidget->setOption('choices', $choices);
         $this->setDefault('leave_type', '');
         $this->setValidator('leave_type', new sfValidatorChoice(array('choices' => array_keys($choices), 'required' => false)));
     }
 }
コード例 #2
0
 public function getJavaScripts()
 {
     $javaScripts = parent::getJavaScripts();
     $javaScripts[] = plugin_web_path('orangehrmLeavePlugin', 'js/addLeaveEntitlementSuccess.js');
     return $javaScripts;
 }