From 5dd4a27d9712ee6c2b9cf2d4f1b54dd3d5632b3c Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 20 Aug 2013 16:26:52 +0530 Subject: [PATCH] skip for priceset total amount zero --- .../CRM/Event/Form/Registration/Register.tpl | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/templates/CRM/Event/Form/Registration/Register.tpl b/templates/CRM/Event/Form/Registration/Register.tpl index e506f61962..8f15b2dfb2 100644 --- a/templates/CRM/Event/Form/Registration/Register.tpl +++ b/templates/CRM/Event/Form/Registration/Register.tpl @@ -212,18 +212,20 @@ }); function skipPaymentMethod() { - cj('#priceset input').change(function() { - if (cj(this).attr('data-amount') == '0') { - cj(".payment_options-group").hide(); - cj("div.payment_processor-section").hide(); - cj("div#payment_information").hide(); - } else { - cj(".payment_options-group").show(); - cj("div.payment_processor-section").show(); - cj("div#payment_information").show(); - } - - }); + var symbol = '{/literal}{$currencySymbol}{literal}'; + cj('#priceset input').change(function () { + if ((cj(this).attr('data-amount') == '0') || (cj('#pricevalue').text() == symbol + " 0.00" )) { + cj(".payment_options-group").hide(); + cj("div.payment_processor-section").hide(); + cj("div#payment_information").hide(); + } + else { + cj(".payment_options-group").show(); + cj("div.payment_processor-section").show(); + cj("div#payment_information").show(); + } + + }); } {/literal} -- 2.25.1