Fixed code for setting payment instrument by default

This commit is contained in:
CiviWare Solutions 2019-03-31 05:04:42 +05:30
parent d975405623
commit 2dd9ef25ef

View File

@ -86,6 +86,16 @@ class CRM_EntityTemplates_Utils {
self::formatDateParams($formValues, $form->_elements); self::formatDateParams($formValues, $form->_elements);
$form->setDefaults($formValues); $form->setDefaults($formValues);
if (!empty($formValues['payment_instrument_id'])) {
CRM_Core_Payment_Form::buildPaymentForm(
$form,
$form->getVar('_paymentProcessor'),
FALSE,
TRUE,
$formValues['payment_instrument_id']
);
}
CRM_Core_Resources::singleton()->addScript(" CRM_Core_Resources::singleton()->addScript("
CRM.$(function($) { CRM.$(function($) {
$(document).ajaxSend(function(event, jqxhr, settings) { $(document).ajaxSend(function(event, jqxhr, settings) {