public $_action;
/**
- * in Date
+ * In Date
*/
private $_inDate;
/**
- * Function to set variables up before form is built
+ * Set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
);
$this->addWysiwyg('pay_later_receipt', ts('Pay Later Instructions'), CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event', 'pay_later_receipt'));
+ $this->addElement('checkbox', 'is_billing_required', ts('Billing address required'));
$this->add('text', 'fee_label', ts('Fee Label'));
$price = CRM_Price_BAO_PriceSet::getAssoc(FALSE, 'CiviEvent');
}
$_showHide->addToTemplate();
$this->addElement('submit', $this->getButtonName('submit'), ts('Add Discount Set to Fee Table'),
- array('class' => 'form-submit cancel')
+ array('class' => 'crm-form-submit cancel')
);
$this->buildAmountLabel();
}
/**
- * global validation rules for the form
+ * Global validation rules for the form
*
* @param array $values posted values of the form
*
}
$params['is_pay_later'] = CRM_Utils_Array::value('is_pay_later', $params, 0);
+ $params['is_billing_required'] = CRM_Utils_Array::value('is_billing_required', $params, 0);
if ($this->_id) {
}
$params['financial_type_id'] = '';
$params['is_pay_later'] = 0;
+ $params['is_billing_required'] = 0;
+ }
+
+ //update 'is_billing_required'
+ if (empty($params['is_pay_later'])) {
+ $params['is_billing_required'] = False;
}
//update events table