| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{include file="CRM/Form/basicForm.tpl"}
+<div class="crm-block crm-form-block crm-{$formName}-block">
+ <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
+ {if $formName == "Contribute_Preferences"}
+ <table class = "form-layout">
+ {foreach from=$htmlFields item=desc key=htmlField}
+ {if $form.$htmlField}
+ {assign var=n value=$htmlField|cat:'_description'}
+ <tr class="crm-preferences-form-block-{$htmlField}">
+ {if $form.$htmlField.html_type EQ 'checkbox'|| $form.$htmlField.html_type EQ 'checkboxes'}
+ <td class="label"></td>
+ <td>
+ {$form.$htmlField.html} {$form.$htmlField.label}
+ {if $desc}
+ <br /><span class="description">{$desc}</span>
+ {/if}
+ </td>
+ {else}
+ <td class="label">{$form.$htmlField.label} {if $htmlField eq 'acl_financial_type'}{help id="$htmlField"}{/if}</td>
+ <td>
+ {$form.$htmlField.html}
+ {if $desc}
+ <br /><span class="description">{$desc}</span>
+ {/if}
+ </td>
+ {/if}
+ </tr>
+ {/if}
+ {/foreach}
+ </table>
+ {/if}
+
+ {include file="CRM/Form/basicFormFields.tpl"}
+ <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}