Hide payment options if js disabled CRM-12149
authorColeman Watts <coleman@civicrm.org>
Sat, 30 Mar 2013 23:53:13 +0000 (16:53 -0700)
committerColeman Watts <coleman@civicrm.org>
Sun, 31 Mar 2013 04:00:39 +0000 (21:00 -0700)
templates/CRM/Contribute/Form/Contribution/Main.tpl
templates/CRM/common/paymentBlock.tpl

index 52586d64090e9ab086ef9718e7271f708a364bc8..17d67d4bb506f0ad8a37009305baf925eebd5e03 100644 (file)
   {/if}
 
   {if $form.payment_processor.label}
-  <fieldset class="crm-group payment_options-group">
+  {* PP selection only works with JS enabled, so we hide it initially *}
+  <fieldset class="crm-group payment_options-group" style="display:none;">
     <legend>{ts}Payment Options{/ts}</legend>
     <div class="crm-section payment_processor-section">
       <div class="label">{$form.payment_processor.label}</div>
index a11a7f551e5a6dcfe57969334ba45701acf270c6..6d75285acbbae4fe638f50276e738584fcfe3f01 100644 (file)
@@ -60,6 +60,8 @@ function buildPaymentBlock( type ) {
 }
 
 cj( function() {
+    cj('.crm-group.payment_options-group').show();
+
     cj('input[name="payment_processor"]').change( function() {
         buildPaymentBlock( cj(this).val() );
     });