From: monishdeb Date: Sat, 29 Aug 2015 20:48:24 +0000 (+0530) Subject: CRM-16966 fix - backoffice buildRecur script loads processor incorrectly (sometimes) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=546ccee6f3d61f0930643abbf50b9eb46a9566c8;p=civicrm-core.git CRM-16966 fix - backoffice buildRecur script loads processor incorrectly (sometimes) https://issues.civicrm.org/jira/browse/CRM-16966 --- 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( ) ) {