/**
  * Overridden parent method to build form
  *
  * @access public
  */
 public function buildQuickForm()
 {
     $this->add('hidden', 'rule_condition_id');
     $financialTypes = CRM_Civirules_Utils::getFinancialTypes();
     $financialTypes[0] = ts('- select -');
     asort($financialTypes);
     $this->add('select', 'financial_type_id', ts('Financial type'), $financialTypes, true);
     $this->add('select', 'operator', ts('Operator'), array('equals', 'is not equal to'), true);
     $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()
 {
     $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 (<=)';
     $financialTypes = CRM_Civirules_Utils::getFinancialTypes();
     $financialTypes[0] = ts(' - any -');
     asort($financialTypes);
     $this->add('hidden', 'rule_condition_id');
     $this->add('select', 'count_operator', ts('Operator'), $operatorList, true);
     $this->add('select', 'amount_operator', ts('where Operator'), $operatorList, true);
     $this->add('select', 'financial_type', ts('of Financial Type'), $financialTypes, true);
     $this->add('text', 'no_of_contributions', ts('Number of Contributions'), array(), true);
     $this->addRule('no_of_contributions', 'Number of contributions must be a whole number', 'numeric');
     $this->addRule('no_of_contributions', 'Number of contributions must be a whole number', 'nopunctuation');
     $this->add('text', 'amount', ts('Amount'), array(), true);
     $this->addRule('amount', 'Amount can only contain numbers', 'numeric');
     $this->addButtons(array(array('type' => 'next', 'name' => ts('Save'), 'isDefault' => TRUE), array('type' => 'cancel', 'name' => ts('Cancel'))));
 }