From: deb.monish Date: Thu, 18 May 2017 08:47:01 +0000 (+0530) Subject: CRM-20516: Card type widget appears on front end when a different processor selected X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7b9cb12a37a07276d5ae167379f2ae8f8abc86a1;p=civicrm-core.git CRM-20516: Card type widget appears on front end when a different processor selected --- diff --git a/CRM/Financial/Form/Payment.php b/CRM/Financial/Form/Payment.php index 996e45abc0..69ee45401d 100644 --- a/CRM/Financial/Form/Payment.php +++ b/CRM/Financial/Form/Payment.php @@ -113,10 +113,12 @@ class CRM_Financial_Form_Payment extends CRM_Core_Form { $creditCards = CRM_Financial_BAO_PaymentProcessor::getCreditCards($paymentProcessorID); $creditCardTypes = CRM_Core_Payment_Form::getCreditCardCSSNames($creditCards); CRM_Core_Resources::singleton() - ->addScriptFile('civicrm', 'templates/CRM/Core/BillingBlock.js', 10, 'html-header', FALSE) + // CRM-20516: add BillingBlock script on billing-block region + // to support this feature in payment form snippet too. + ->addScriptFile('civicrm', 'templates/CRM/Core/BillingBlock.js', 10, 'billing-block', FALSE) // workaround for CRM-13634 // ->addSetting(array('config' => array('creditCardTypes' => $creditCardTypes))); - ->addScript('CRM.config.creditCardTypes = ' . json_encode($creditCardTypes) . ';', '-9999', 'html-header'); + ->addScript('CRM.config.creditCardTypes = ' . json_encode($creditCardTypes) . ';', '-9999', 'billing-block'); } }