From b22decfdacc3e3548ce56d35ed8d68910f02dcb9 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 2 Jun 2015 15:20:10 -0400 Subject: [PATCH] CRM-16555 - Fix paymentBlock js for front-end forms --- templates/CRM/common/paymentBlock.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/CRM/common/paymentBlock.tpl b/templates/CRM/common/paymentBlock.tpl index 4131f829a2..54016083e4 100644 --- a/templates/CRM/common/paymentBlock.tpl +++ b/templates/CRM/common/paymentBlock.tpl @@ -59,8 +59,8 @@ function buildPaymentBlock(type) { CRM.$(function($) { $('.crm-group.payment_options-group').show(); - - $('#payment_processor_id').change( function() { + // FIXME: This code is getting re-loaded and re-run every time, using .off() as a temporary fix + $('[name=payment_processor_id]').off('.paymentBlock').on('change.paymentBlock', function() { buildPaymentBlock( $(this).val() ); }); }); -- 2.25.1