2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2017 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 <div class="crm-block crm-form-block crm-{$formName}-block">
27 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
28 {if $formName == "Contribute_Preferences"}
29 <table class = "form-layout">
30 {foreach from=$htmlFields item=desc key=htmlField}
32 {assign var=n value=$htmlField|cat:'_description'}
33 <tr class="crm-preferences-form-block-{$htmlField}">
34 {if $form.$htmlField.html_type EQ 'checkbox'|| $form.$htmlField.html_type EQ 'checkboxes'}
35 <td class="label"></td>
37 {$form.$htmlField.html} {$form.$htmlField.label}
39 <br /><span class="description">{$desc}</span>
43 <td class="label">{$form.$htmlField.label} {if $htmlField eq 'acl_financial_type'}{help id="$htmlField"}{/if}</td>
45 {if $htmlField eq 'prior_financial_period'}
46 {include file="CRM/common/jcalendar.tpl" elementName=$htmlField}
48 {$form.$htmlField.html}
51 <br /><span class="description">{$desc}</span>
58 {$form.prior_financial_period_M_hidden.html}
59 {$form.prior_financial_period_d_hidden.html}
62 <table class="form-layout" id="invoicing_blocks">
63 {foreach from=$fields item=field key=fieldName}
64 {assign var=n value=$fieldName}
66 <tr class="crm-preferences-form-block-{$fieldName}">
67 {if $field.html_type EQ 'checkbox'|| $field.html_type EQ 'checkboxes'}
68 <td class="label"></td>
70 {$form.$n.html} {$form.$n.label}
71 {if $field.description}
72 <br /><span class="description">{$field.description}</span>
76 <td class="label">{$form.$n.label}</td>
79 {if $field.description}
80 <br /><span class="description">{$field.description}</span>
89 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
91 {if $formName == "Contribute_Preferences"}
93 <script type="text/javascript">
94 cj(document).ready(function() {
95 if (document.getElementById("invoicing").checked) {
96 cj("#invoicing_blocks").show();
99 cj("#invoicing_blocks").hide();
103 cj("input[type=checkbox]").click(function() {
104 if (cj("#invoicing").is(":checked")) {
105 cj("#invoicing_blocks").show();
108 cj("#invoicing_blocks").hide();