/** * Overridden parent method to build form * * @access public */ public function buildQuickForm() { $operatorList[0] = 'equals (=)'; $operatorList[1] = 'is not equal (!=)'; $operatorList[2] = 'is more than (>)'; $operatorList[3] = 'is more than or equal (>=)'; $operatorList[4] = 'is less than (<)'; $operatorList[5] = 'is less than or equal (<=)'; $this->add('hidden', 'rule_condition_id'); $this->add('select', 'operator', ts('Operator'), $operatorList, true); $this->add('text', 'no_of_days', ts('Number of Days'), array(), true); $this->addRule('no_of_days', 'Number of Days must be a whole number', 'numeric'); $this->addRule('no_of_days', 'Number of Days must be a whole number', 'nopunctuation'); CRM_CivirulesConditions_Utils_Period::buildQuickForm($this); $this->addButtons(array(array('type' => 'next', 'name' => ts('Save'), 'isDefault' => TRUE), array('type' => 'cancel', 'name' => ts('Cancel')))); }
/** * Overridden parent method to build form * * @access public */ public function buildQuickForm() { parent::buildQuickForm(); CRM_CivirulesConditions_Utils_Period::buildQuickForm($this); }