CRM-16111: Translation string fixes (4.6 review).
[civicrm-core.git] / templates / CRM / Form / basicForm.tpl
index 5eea79330bea859f790e213f7eb3ccf7fdeb91cd..a3f0dd35e176d4606cb6cd052bb15df43703a54b 100644 (file)
@@ -1,6 +1,6 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 *}
 <div class="crm-block crm-form-block crm-{$formName}-block">
     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
-    <table class="form-layout">
+    {if $formName == "Contribute_Preferences" }
+      <table class="form-layout">
+        <tr class="crm-preferences-form-block-invoicing">
+          <td>
+            {$form.invoicing.html} {$form.invoicing.label}
+          </td>
+        </tr>
+      </table>
+    {/if}
+    <table class="form-layout" id="invoicing_blocks">
         {foreach from=$fields item=field key=fieldName}
             {assign var=n value=$fieldName}
             {if $form.$n}
 
     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
 </div>
+{if $formName == "Contribute_Preferences"}
+  {literal}
+    <script type="text/javascript">
+      cj(document).ready(function() {
+        if (document.getElementById("invoicing").checked) {
+          cj("#invoicing_blocks").show();
+        }
+        else {
+          cj("#invoicing_blocks").hide();
+        }
+      });
+      cj(function () {
+        cj("input[type=checkbox]").click(function() {
+          if (cj("#invoicing").is(":checked")) {
+            cj("#invoicing_blocks").show();
+          }
+          else {
+            cj("#invoicing_blocks").hide();
+          }
+        });
+      });
+    </script>
+  {/literal}
+{/if}