From 95e7a69559a3b6e6ab4d4809dbb8dfebbb86da16 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 11 Mar 2015 14:10:53 -0400 Subject: [PATCH] CRM-16093 - Fix js error on participant form --- CRM/Event/Form/EventFees.php | 2 +- templates/CRM/Event/Form/Participant.tpl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Event/Form/EventFees.php b/CRM/Event/Form/EventFees.php index 898bbf9040..e102ec4831 100644 --- a/CRM/Event/Form/EventFees.php +++ b/CRM/Event/Form/EventFees.php @@ -393,7 +393,7 @@ SELECT id, html_type array( 0 => ts('- select -')) + $discounts, FALSE, - array('onchange' => "buildFeeBlock( {$form->_eventId}, this.value );") + array('class' => "crm-select2") ); if ($form->_online) { diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl index 3c5822baf1..2858c322b8 100644 --- a/templates/CRM/Event/Form/Participant.tpl +++ b/templates/CRM/Event/Form/Participant.tpl @@ -373,6 +373,9 @@ if ($('#discount_id', $form).val()) { buildFeeBlock($('#discount_id', $form).val()); } + $($form).on('change', '#discount_id', function() { + buildFeeBlock($(this).val()); + }); function buildRoleCustomData() { var roleId = $('select[name^=role_id]', $form).val().join(); -- 2.25.1