Don't show pay_later processor on additional live Paymen
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 19 Jun 2023 22:57:25 +0000 (10:57 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 19 Jun 2023 22:57:25 +0000 (10:57 +1200)
CRM/Contribute/Form/AbstractEditPayment.php
CRM/Contribute/Form/AdditionalPayment.php

index df8c29cdc511b4e5c2ce6032788efc8d0f1a50ea..90b2fe152257dd066f0ec7a12ec45c14357655ae 100644 (file)
@@ -697,7 +697,7 @@ class CRM_Contribute_Form_AbstractEditPayment extends CRM_Contact_Form_Task {
     if (!$this->_mode) {
       return;
     }
-    $js = ($isBuildRecurBlock ? ['onChange' => "buildRecurBlock( this.value ); return false;"] : NULL);
+    $js = ($isBuildRecurBlock ? ['onChange' => "buildRecurBlock( this.value ); return false;"] : []);
     if ($isBuildAutoRenewBlock) {
       $js = ['onChange' => "buildAutoRenew( null, this.value, '{$this->_mode}');"];
     }
index d5e752fad11a172bd30bf11cc7efcbbe23aabe3f..bbf41548d04678cf51f46d47e6e6cfae868a9b72 100644 (file)
@@ -191,7 +191,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
     }
 
     CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE, TRUE, CRM_Utils_Request::retrieve('payment_instrument_id', 'Integer'));
-    $this->add('select', 'payment_processor_id', ts('Payment Processor'), $this->_processors, NULL, ['class' => 'crm-select2']);
+    $this->addPaymentProcessorSelect(FALSE);
 
     $attributes = CRM_Core_DAO::getAttribute('CRM_Financial_DAO_FinancialTrxn');