From: Coleman Watts Date: Wed, 11 Mar 2015 18:10:53 +0000 (-0400) Subject: CRM-16093 - Fix js error on participant form X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=95e7a69559a3b6e6ab4d4809dbb8dfebbb86da16;p=civicrm-core.git CRM-16093 - Fix js error on participant form --- 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();