From 546ccee6f3d61f0930643abbf50b9eb46a9566c8 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Sun, 30 Aug 2015 02:18:24 +0530 Subject: [PATCH] CRM-16966 fix - backoffice buildRecur script loads processor incorrectly (sometimes) https://issues.civicrm.org/jira/browse/CRM-16966 --- templates/CRM/Contribute/Form/AdditionalInfo/Payment.tpl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/CRM/Contribute/Form/AdditionalInfo/Payment.tpl b/templates/CRM/Contribute/Form/AdditionalInfo/Payment.tpl index a1f4d4f99f..a6810dd89a 100644 --- a/templates/CRM/Contribute/Form/AdditionalInfo/Payment.tpl +++ b/templates/CRM/Contribute/Form/AdditionalInfo/Payment.tpl @@ -23,11 +23,9 @@ } function buildRecurBlock( processorId ) { - if ( !processorId ) processorId = cj( "#payment_processor_id" ).val( ); var recurPaymentProIds = {/literal}'{$recurringPaymentProcessorIds}'{literal}; - var funName = 'hide'; - if ( recurPaymentProIds.indexOf( processorId ) != -1 ) funName = 'show'; + var funName = ( cj.inArray(processorId, recurPaymentProIds.split(',')) > -1 ) ? 'show' : 'hide'; var priceSet = cj("#price_set_id"); if ( priceSet && priceSet.val( ) ) { -- 2.25.1