From: Coleman Watts Date: Tue, 2 Jun 2015 19:20:10 +0000 (-0400) Subject: CRM-16555 - Fix paymentBlock js for front-end forms X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b22decfdacc3e3548ce56d35ed8d68910f02dcb9;p=civicrm-core.git CRM-16555 - Fix paymentBlock js for front-end forms --- 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() ); }); });