$this->add('text', 'name', ts('Name'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'name'), TRUE);
$this->addRule('name', ts('A product with this name already exists. Please select another name.'), 'objectExists', array(
'CRM_Contribute_DAO_Product',
- $this->_id
+ $this->_id,
));
$this->add('text', 'sku', ts('SKU'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'sku'));
$this->add('select', 'period_type', ts('Period Type'), array(
'' => '- select -',
'rolling' => 'Rolling',
- 'fixed' => 'Fixed'
+ 'fixed' => 'Fixed',
));
$this->add('text', 'fixed_period_start_day', ts('Fixed Period Start Day'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'fixed_period_start_day'));
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files) {
if (isset($params['imageOption'])) {
foreach (array(
'cost',
'price',
- 'min_contribution'
+ 'min_contribution',
) as $f) {
$params[$f] = CRM_Utils_Rule::cleanMoney($params[$f]);
}