From 6f26f78f3ae6be62e835cf823591ea20dcac869d Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Tue, 7 Mar 2017 09:40:15 -0500 Subject: [PATCH] CRM-20146 dont hardcode check payment instrument --- CRM/Contribute/Form/Contribution.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);") ); } -- 2.25.1