From 72b77ed29d174f9796498fd5aaad2e00801525c2 Mon Sep 17 00:00:00 2001 From: "agbud8@zabuntu" Date: Tue, 9 Feb 2021 16:27:57 -0500 Subject: [PATCH] event#48: Fix partially paid events in a modal dialog --- templates/CRM/Event/Form/Participant.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl index 498eb2697f..da6a15c9cc 100644 --- a/templates/CRM/Event/Form/Participant.tpl +++ b/templates/CRM/Event/Form/Participant.tpl @@ -130,7 +130,7 @@ userModifiedAmount = cj(this).val(); userModifiedAmount = Number(userModifiedAmount.replace(/[^0-9\.]+/g,"")); if (userModifiedAmount < feeAmount) { - cj('#status_id').val(partiallyPaidStatusId).change(); + cj('.crm-participant-form-block-status_id #status_id').val(partiallyPaidStatusId).change(); } } ); @@ -143,8 +143,8 @@ return true; } } - var userSubmittedStatus = cj('#status_id').val(); - var statusLabel = cj('#status_id option:selected').text(); + var userSubmittedStatus = cj('.crm-participant-form-block-status_id #status_id').val(); + var statusLabel = cj('.crm-participant-form-block-status_id #status_id option:selected').text(); if (userModifiedAmount < feeAmount && userSubmittedStatus != partiallyPaidStatusId) { var msg = "{/literal}{ts escape="js" 1="%1"}Payment amount is less than the amount owed. Expected participant status is 'Partially paid'. Are you sure you want to set the participant status to %1? Click OK to continue, Cancel to change your entries.{/ts}{literal}"; var result = confirm(ts(msg, {1: statusLabel})); @@ -435,7 +435,7 @@ function sendNotification() { var notificationStatusIds = {/literal}"{$notificationStatusIds}"{literal}; notificationStatusIds = notificationStatusIds.split(','); - if (cj.inArray(cj('select#status_id option:selected').val(), notificationStatusIds) > -1) { + if (cj.inArray(cj('.crm-participant-form-block-status_id select#status_id option:selected').val(), notificationStatusIds) > -1) { cj("#notify").show(); cj("#is_notify").prop('checked', false); } -- 2.25.1