diff --git a/CRM/Event/Form/ManageEvent/Fee.php b/CRM/Event/Form/ManageEvent/Fee.php index beaeb885bfa..8b024d73e20 100644 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@ -228,12 +228,12 @@ public function setDefaultValues() { } $this->_showHide->addToTemplate(); $this->assign('inDate', $this->_inDate); - if (!empty($defaults['payment_processor'])) { - $defaults['payment_processor'] = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', + $defaults['payment_processor'] = array_fill_keys(explode(CRM_Core_DAO::VALUE_SEPARATOR, $defaults['payment_processor'] - ); + ), '1'); } + return $defaults; } @@ -255,15 +255,11 @@ public function buildQuickForm() { $paymentProcessor = CRM_Core_PseudoConstant::paymentProcessor(); $this->assign('paymentProcessor', $paymentProcessor); - - $this->addEntityRef('payment_processor', ts('Payment Processor'), array( - 'entity' => 'PaymentProcessor', - 'multiple' => TRUE, - 'api' => array( - 'params' => array('domain_id' => CRM_Core_Config::domainID()), - ), - 'select' => array('minimumInputLength' => 0), - )); + $this->addCheckBox('payment_processor', ts('Payment Processor'), + array_flip($paymentProcessor), + NULL, NULL, NULL, NULL, + array('  ', '  ', '  ', '
') + ); // financial type if (!CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() || @@ -564,7 +560,7 @@ public function postProcess() { } if (!empty($params['payment_processor'])) { - $params['payment_processor'] = str_replace(',', CRM_Core_DAO::VALUE_SEPARATOR, $params['payment_processor']); + $params['payment_processor'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($params['payment_processor'])); } else { $params['payment_processor'] = 'null';