From: Brian Shaughnessy Date: Tue, 7 Mar 2017 14:40:15 +0000 (-0500) Subject: CRM-20146 dont hardcode check payment instrument X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6f26f78f3ae6be62e835cf823591ea20dcac869d;p=civicrm-core.git CRM-20146 dont hardcode check payment instrument --- diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 1f8b49c513..6990f977b2 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -649,10 +649,11 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $paymentInstrument = FALSE; if (!$this->_mode) { + $checkPaymentID = array_search('Check', CRM_Contribute_PseudoConstant::paymentInstrument('name')); $paymentInstrument = $this->add('select', 'payment_instrument_id', ts('Payment Method'), array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::paymentInstrument(), - TRUE, array('onChange' => "return showHideByValue('payment_instrument_id','4','checkNumber','table-row','select',false);") + TRUE, array('onChange' => "return showHideByValue('payment_instrument_id','{$checkPaymentID}','checkNumber','table-row','select',false);") ); }