Merge pull request #2548 from rcsheets/doc_improvements
[civicrm-core.git] / templates / CRM / Grant / Form / Grant.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 {* this template is used for adding/editing/deleting grant *}
27
28 {if $cdType}
29 {include file="CRM/Custom/Form/CustomData.tpl"}
30 {else}
31
32 {if $action eq 1 and $context ne 'standalone'}
33 <h3>{ts}New Grant{/ts}</h3>
34 {elseif $action eq 2}
35 <h3>{ts}Edit Grant{/ts}</h3>
36 {elseif $action eq 8}
37 <h3>{ts}Delete Grant{/ts}</h3>
38 {/if}
39
40 <div class="crm-block crm-form-block crm-grant-form-block">
41 {if $action eq 8}
42 <div class="messages status">
43 <p><div class="icon inform-icon"></div>&nbsp;
44 {ts}Are you sure you want to delete this Grant?{/ts} {ts}This operation cannot be undone.{/ts}</p>
45 <p>{include file="CRM/Grant/Form/Task.tpl"}</p>
46 </div>
47 {else}
48 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
49 <table class="form-layout-compressed">
50 {if $context eq 'standalone'}
51 <tr class="crm-grant-form-block-contact_id">
52 <td class="label">{$form.contact_id.label}</td>
53 <td>{$form.contact_id.html}</td>
54 </tr>
55 {/if}
56 <tr class="crm-grant-form-block-status_id">
57 <td class="label">{$form.status_id.label}</td>
58 <td>{$form.status_id.html}</td>
59 </tr>
60 <tr class="crm-grant-form-block-grant_type_id">
61 <td class="label">{$form.grant_type_id.label}</td>
62 <td>{$form.grant_type_id.html}</td>
63 </tr>
64 <tr class="crm-grant-form-block-amount_total">
65 <td class="label">{$form.amount_total.label}</td>
66 <td>{$form.amount_total.html}</td>
67 </tr>
68 <tr class="crm-grant-form-block-amount_requested">
69 <td class="label">{$form.amount_requested.label}</td>
70 <td>{$form.amount_requested.html}<br /><span class="description">{ts}Amount requested for grant in original currency (if different).{/ts}</span></td>
71 </tr>
72 <tr class="crm-grant-form-block-amount_granted">
73 <td class="label">{$form.amount_granted.label}</td>
74 <td>{$form.amount_granted.html}</td>
75 </tr>
76 <tr class="crm-grant-form-block-application_received_date">
77 <td class="label">{$form.application_received_date.label}</td>
78 <td>{if $hideCalendar neq true}
79 {include file="CRM/common/jcalendar.tpl" elementName=application_received_date}
80 {else}
81 {$form.application_received_date.html|crmDate}
82 {/if}</td>
83 </tr>
84 <tr class="crm-grant-form-block-decision_date">
85 <td class="label">{$form.decision_date.label}</td>
86 <td>{if $hideCalendar neq true}
87 {include file="CRM/common/jcalendar.tpl" elementName=decision_date}
88 {else}
89 {$form.decision_date.html|crmDate}
90 {/if}<br />
91 <span class="description">{ts}Date on which the grant decision was finalized.{/ts}</span></td>
92 </tr>
93 <tr class="crm-grant-form-block-money_transfer_date"><td class="label">{$form.money_transfer_date.label}</td>
94 <td>{if $hideCalendar neq true}
95 {include file="CRM/common/jcalendar.tpl" elementName=money_transfer_date}
96 {else}
97 {$form.money_transfer_date.html|crmDate}
98 {/if}<br /><span class="description">{ts}Date on which the grant money was transferred.{/ts}</span></td>
99 </tr>
100 <tr class="crm-grant-form-block-grant_due_date"><td class="label">{$form.grant_due_date.label}</td>
101 <td>{if $hideCalendar neq true}
102 {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date}
103 {else}
104 {$form.grant_due_date.html|crmDate}
105 {/if}</td>
106 </tr>
107 <tr class="crm-grant-form-block-grant_report_received">
108 <td class="label">{$form.grant_report_received.label}</td>
109 <td>{$form.grant_report_received.html}</td>
110 </tr>
111 <tr class="crm-grant-form-block-rationale">
112 <td class="label">{$form.rationale.label}</td>
113 <td>{$form.rationale.html}</td>
114 </tr>
115 <tr class="crm-grant-form-block-note">
116 <td class="label">{$form.note.label}</td>
117 <td>{$form.note.html}</td>
118 </tr>
119 </table>
120
121 <div id="customData" class="crm-grant-form-block-custom_data"></div>
122 {*include custom data js file*}
123 {include file="CRM/common/customData.tpl"}
124
125 {literal}
126 <script type="text/javascript">
127 cj( function( ) {
128 {/literal}
129 CRM.buildCustomData( '{$customDataType}' );
130 {if $customDataSubType}
131 CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
132 {/if}
133 {literal}
134 });
135
136 cj(function() {
137 cj().crmAccordions();
138 });
139 </script>
140 {/literal}
141
142 <div class="crm-grant-form-block-attachment">
143 {include file="CRM/Form/attachment.tpl"}
144 </div>
145
146 {/if}
147 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
148 </div>
149
150 {/if} {* closing of main custom data if *}