Merge pull request #6499 from mlutfy/47-crm17025
[civicrm-core.git] / templates / CRM / Form / basicForm.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
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. |
12 | |
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. |
17 | |
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 +--------------------------------------------------------------------+
25 *}
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 <tr class="crm-miscellaneous-form-block-cvv-backoffice-required">
31 <td class="label">{$form.cvv_backoffice_required.label}</td>
32 <td>
33 {$form.cvv_backoffice_required.html}<br />
34 <p class="description">{ts}{$cvv_backoffice_required_description}{/ts}</p>
35 </td>
36 </tr>
37 {if $formName == "Contribute_Preferences" }
38 <tr class="crm-preferences-form-block-invoicing">
39 <td class="label">{$form.invoicing.label}</td>
40 <td>
41 {$form.invoicing.html}
42 </td>
43 </tr>
44 {/if}
45 </table>
46 {/if}
47 <table class="form-layout" id="invoicing_blocks">
48 {foreach from=$fields item=field key=fieldName}
49 {assign var=n value=$fieldName}
50 {if $form.$n}
51 <tr class="crm-preferences-form-block-{$fieldName}">
52 {if $field.html_type EQ 'checkbox'|| $field.html_type EQ 'checkboxes'}
53 <td class="label"></td>
54 <td>
55 {$form.$n.html} {$form.$n.label}
56 {if $field.description}
57 <br /><span class="description">{$field.description}</span>
58 {/if}
59 </td>
60 {else}
61 <td class="label">{$form.$n.label}</td>
62 <td>
63 {$form.$n.html}
64 {if $field.description}
65 <br /><span class="description">{$field.description}</span>
66 {/if}
67 </td>
68 {/if}
69 </tr>
70 {/if}
71 {/foreach}
72 </table>
73
74 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
75 </div>
76 {if $formName == "Contribute_Preferences"}
77 {literal}
78 <script type="text/javascript">
79 cj(document).ready(function() {
80 if (document.getElementById("invoicing").checked) {
81 cj("#invoicing_blocks").show();
82 }
83 else {
84 cj("#invoicing_blocks").hide();
85 }
86 });
87 cj(function () {
88 cj("input[type=checkbox]").click(function() {
89 if (cj("#invoicing").is(":checked")) {
90 cj("#invoicing_blocks").show();
91 }
92 else {
93 cj("#invoicing_blocks").hide();
94 }
95 });
96 });
97 </script>
98 {/literal}
99 {/if}