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))); } }
public function getJavaScripts() { $javaScripts = parent::getJavaScripts(); $javaScripts[] = plugin_web_path('orangehrmLeavePlugin', 'js/addLeaveEntitlementSuccess.js'); return $javaScripts; }