Merge remote branch 'canonical/master' into merge-forward
[civicrm-core.git] / templates / CRM / Contribute / Form / Contribution / Main.tpl
index 66012aede708888467842415fee5b019323449bb..8317871f15c05e538639417c1b7b9f0baef2e8cd 100644 (file)
 
   <div id="billing-payment-block">
     {* If we have a payment processor, load it - otherwise it happens via ajax *}
-    {if $ppType}
+    {if $ppType or $isBillingAddressRequiredForPayLater}
       {include file="CRM/Contribute/Form/Contribution/Main.tpl" snippet=4}
     {/if}
   </div>
       }
     }
 
-    CRM.$('#pricevalue').each(toggleBillingBlockIfFree);
-
-    $('#priceset input').on('change', function() {
-      CRM.$('#pricevalue').each(toggleBillingBlockIfFree);
-    });
+    $('#pricevalue').each(toggleBillingBlockIfFree).on('change', toggleBillingBlockIfFree);
   });
   {/literal}
 </script>