From: yashodha Date: Tue, 20 Aug 2013 10:56:52 +0000 (+0530) Subject: skip for priceset total amount zero X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5dd4a27d9712ee6c2b9cf2d4f1b54dd3d5632b3c;p=civicrm-core.git skip for priceset total amount zero --- 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}