commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / templates / CRM / Form / basicForm.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
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-preferences-form-block-invoicing">
31 <td>
32 {$form.invoicing.html} {$form.invoicing.label}
33 </td>
34 </tr>
35 </table>
36 {/if}
37 <table class="form-layout" id="invoicing_blocks">
38 {foreach from=$fields item=field key=fieldName}
39 {assign var=n value=$fieldName}
40 {if $form.$n}
41 <tr class="crm-preferences-form-block-{$fieldName}">
42 {if $field.html_type EQ 'checkbox'|| $field.html_type EQ 'checkboxes'}
43 <td class="label"></td>
44 <td>
45 {$form.$n.html} {$form.$n.label}
46 {if $field.description}
47 <br /><span class="description">{$field.description}</span>
48 {/if}
49 </td>
50 {else}
51 <td class="label">{$form.$n.label}</td>
52 <td>
53 {$form.$n.html}
54 {if $field.description}
55 <br /><span class="description">{$field.description}</span>
56 {/if}
57 </td>
58 {/if}
59 </tr>
60 {/if}
61 {/foreach}
62 </table>
63
64 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
65 </div>
66 {if $formName == "Contribute_Preferences"}
67 {literal}
68 <script type="text/javascript">
69 cj(document).ready(function() {
70 if (document.getElementById("invoicing").checked) {
71 cj("#invoicing_blocks").show();
72 }
73 else {
74 cj("#invoicing_blocks").hide();
75 }
76 });
77 cj(function () {
78 cj("input[type=checkbox]").click(function() {
79 if (cj("#invoicing").is(":checked")) {
80 cj("#invoicing_blocks").show();
81 }
82 else {
83 cj("#invoicing_blocks").hide();
84 }
85 });
86 });
87 </script>
88 {/literal}
89 {/if}