}
cj('#priceset input[type="radio"]').change(updatePriceSetHighlight);
updatePriceSetHighlight();
+
+ function toggleBillingBlockIfFree(){
+ var total_amount_tmp = $(this).data('raw-total');
+ // Hide billing questions if this is free
+ if( total_amount_tmp == 0 ){
+ cj("#billing-payment-block").hide();
+ }else{
+ cj("#billing-payment-block").show();
+ }
+ }
+ CRM.$('#pricevalue').each( toggleBillingBlockIfFree);
+
+ $('#priceset input').on('change', function() {
+ CRM.$('#pricevalue').each( toggleBillingBlockIfFree);
+ });
});
{/literal}
</script>
scriptfee = totalfee;
scriptarray = price;
cj('#total_amount').val( totalfee );
+ cj('#pricevalue').data('raw-total', totalfee );
( totalfee < 0 ) ? cj('table#pricelabel').addClass('disabled') : cj('table#pricelabel').removeClass('disabled');
if (typeof skipPaymentMethod == 'function') {