Improve coding style on HTML templates
[civicrm-core.git] / xml / templates / message_templates / contribution_online_receipt_html.tpl
CommitLineData
6a488035
TO
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5 <title></title>
6</head>
7<body>
8
9{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
10{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
11{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
12
13<center>
14 <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
15
16 <!-- BEGIN HEADER -->
17 <!-- You can add table row(s) here with logo or other header elements -->
18 <!-- END HEADER -->
19
20 <!-- BEGIN CONTENT -->
21
22 <tr>
23 <td>
24
25 {if $receipt_text}
26 <p>{$receipt_text|htmlize}</p>
27 {/if}
28
29 {if $is_pay_later}
30 <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
31 {else}
32 <p>{ts}Please print this confirmation for your records.{/ts}</p>
33 {/if}
34
35 </td>
36 </tr>
37 </table>
38 <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
39
40 {if $amount}
41
42
43 <tr>
44 <th {$headerStyle}>
45 {ts}Contribution Information{/ts}
46 </th>
47 </tr>
48
49 {if $lineItem and $priceSetID and !$is_quick_config}
50
51 {foreach from=$lineItem item=value key=priceset}
52 <tr>
53 <td colspan="2" {$valueStyle}>
54 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
55 <tr>
56 <th>{ts}Item{/ts}</th>
57 <th>{ts}Qty{/ts}</th>
58 <th>{ts}Each{/ts}</th>
59 <th>{ts}Total{/ts}</th>
60 </tr>
61 {foreach from=$value item=line}
62 <tr>
63 <td>
64 {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
65 </td>
66 <td>
67 {$line.qty}
68 </td>
69 <td>
70 {$line.unit_price|crmMoney:$currency}
71 </td>
72 <td>
73 {$line.line_total|crmMoney:$currency}
74 </td>
75 </tr>
76 {/foreach}
77 </table>
78 </td>
79 </tr>
80 {/foreach}
81 <tr>
82 <td {$labelStyle}>
83 {ts}Total Amount{/ts}
84 </td>
85 <td {$valueStyle}>
86 {$amount|crmMoney:$currency}
87 </td>
88 </tr>
89
90 {else}
91
92 <tr>
93 <td {$labelStyle}>
94 {ts}Amount{/ts}
95 </td>
96 <td {$valueStyle}>
97 {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
98 </td>
99 </tr>
100
101 {/if}
102
103 {/if}
104
105
106 {if $receive_date}
107 <tr>
108 <td {$labelStyle}>
109 {ts}Date{/ts}
110 </td>
111 <td {$valueStyle}>
112 {$receive_date|crmDate}
113 </td>
114 </tr>
115 {/if}
116
117 {if $is_monetary and $trxn_id}
118 <tr>
119 <td {$labelStyle}>
120 {ts}Transaction #{/ts}
121 </td>
122 <td {$valueStyle}>
123 {$trxn_id}
124 </td>
125 </tr>
126 {/if}
127
128 {if $is_recur}
129 {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
130 <tr>
131 <td colspan="2" {$labelStyle}>
132 {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can cancel future contributions by <a href="%1">visiting this web page</a>.{/ts}
133 </td>
1a9f6d0d
PJ
134 {if $updateSubscriptionBillingUrl}
135 <tr>
136 </tr>
137 <td colspan="2" {$labelStyle}>
138 {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
139 </td>
011aeb62 140 {/if}
6a488035
TO
141 <tr>
142 </tr>
143 <td colspan="2" {$labelStyle}>
144 {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
145 </td>
146 </tr>
147 {/if}
148 {/if}
149
150 {if $honor_block_is_active}
151 <tr>
152 <th {$headerStyle}>
1421174e 153 {$soft_credit_type}
6a488035
TO
154 </th>
155 </tr>
1421174e 156 {foreach from=$honoreeProfile item=value key=label}
157 <tr>
158 <td {$labelStyle}>
159 {$label}
160 </td>
161 <td {$valueStyle}>
162 {$value}
163 </td>
164 </tr>
165 {/foreach}
6a488035
TO
166 {/if}
167
168 {if $pcpBlock}
169 <tr>
170 <th {$headerStyle}>
171 {ts}Personal Campaign Page{/ts}
172 </th>
173 </tr>
174 <tr>
175 <td {$labelStyle}>
176 {ts}Display In Honor Roll{/ts}
177 </td>
178 <td {$valueStyle}>
179 {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
180 </td>
181 </tr>
182 {if $pcp_roll_nickname}
183 <tr>
184 <td {$labelStyle}>
185 {ts}Nickname{/ts}
186 </td>
187 <td {$valueStyle}>
188 {$pcp_roll_nickname}
189 </td>
190 </tr>
191 {/if}
192 {if $pcp_personal_note}
193 <tr>
194 <td {$labelStyle}>
195 {ts}Personal Note{/ts}
196 </td>
197 <td {$valueStyle}>
198 {$pcp_personal_note}
199 </td>
200 </tr>
201 {/if}
202 {/if}
203
204 {if $onBehalfProfile}
205 <tr>
206 <th {$headerStyle}>
207 {$onBehalfProfile_grouptitle}
208 </th>
209 </tr>
210 {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
211 <tr>
212 <td {$labelStyle}>
213 {$onBehalfName}
214 </td>
215 <td {$valueStyle}>
216 {$onBehalfValue}
217 </td>
218 </tr>
219 {/foreach}
220 {/if}
221
222 {if $isShare}
223 <tr>
224 <td colspan="2" {$valueStyle}>
225 {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
226 {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$contributionUrl title=$title pageURL=$contributionUrl}
227 </td>
228 </tr>
229 {/if}
230
231 {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
232 {if $is_pay_later}
233 <tr>
234 <th {$headerStyle}>
235 {ts}Registered Email{/ts}
236 </th>
237 </tr>
238 <tr>
239 <td colspan="2" {$valueStyle}>
240 {$email}
241 </td>
242 </tr>
243 {elseif $amount GT 0}
244 <tr>
245 <th {$headerStyle}>
246 {ts}Billing Name and Address{/ts}
247 </th>
248 </tr>
249 <tr>
250 <td colspan="2" {$valueStyle}>
251 {$billingName}<br />
252 {$address|nl2br}<br />
253 {$email}
254 </td>
255 </tr>
256 {/if}
257 {/if}
258
259 {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
260 <tr>
261 <th {$headerStyle}>
262 {ts}Credit Card Information{/ts}
263 </th>
264 </tr>
265 <tr>
266 <td colspan="2" {$valueStyle}>
267 {$credit_card_type}<br />
268 {$credit_card_number}<br />
269 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
270 </td>
271 </tr>
272 {/if}
273
274 {if $selectPremium}
275 <tr>
276 <th {$headerStyle}>
277 {ts}Premium Information{/ts}
278 </th>
279 </tr>
280 <tr>
281 <td colspan="2" {$labelStyle}>
282 {$product_name}
283 </td>
284 </tr>
285 {if $option}
286 <tr>
287 <td {$labelStyle}>
288 {ts}Option{/ts}
289 </td>
290 <td {$valueStyle}>
291 {$option}
292 </td>
293 </tr>
294 {/if}
295 {if $sku}
296 <tr>
297 <td {$labelStyle}>
298 {ts}SKU{/ts}
299 </td>
300 <td {$valueStyle}>
301 {$sku}
302 </td>
303 </tr>
304 {/if}
305 {if $start_date}
306 <tr>
307 <td {$labelStyle}>
308 {ts}Start Date{/ts}
309 </td>
310 <td {$valueStyle}>
311 {$start_date|crmDate}
312 </td>
313 </tr>
314 {/if}
315 {if $end_date}
316 <tr>
317 <td {$labelStyle}>
318 {ts}End Date{/ts}
319 </td>
320 <td {$valueStyle}>
321 {$end_date|crmDate}
322 </td>
323 </tr>
324 {/if}
325 {if $contact_email OR $contact_phone}
326 <tr>
327 <td colspan="2" {$valueStyle}>
328 <p>{ts}For information about this premium, contact:{/ts}</p>
329 {if $contact_email}
330 <p>{$contact_email}</p>
331 {/if}
332 {if $contact_phone}
333 <p>{$contact_phone}</p>
334 {/if}
335 </td>
336 </tr>
337 {/if}
338 {if $is_deductible AND $price}
339 <tr>
340 <td colspan="2" {$valueStyle}>
341 <p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
342 </td>
343 </tr>
344 {/if}
345 {/if}
346
347 {if $customPre}
348 <tr>
349 <th {$headerStyle}>
350 {$customPre_grouptitle}
351 </th>
352 </tr>
353 {foreach from=$customPre item=customValue key=customName}
354 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
355 <tr>
356 <td {$labelStyle}>
357 {$customName}
358 </td>
359 <td {$valueStyle}>
360 {$customValue}
361 </td>
362 </tr>
363 {/if}
364 {/foreach}
365 {/if}
366
367 {if $customPost}
368 <tr>
369 <th {$headerStyle}>
370 {$customPost_grouptitle}
371 </th>
372 </tr>
373 {foreach from=$customPost item=customValue key=customName}
374 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
375 <tr>
376 <td {$labelStyle}>
377 {$customName}
378 </td>
379 <td {$valueStyle}>
380 {$customValue}
381 </td>
382 </tr>
383 {/if}
384 {/foreach}
385 {/if}
386
387 </table>
388</center>
389
390</body>
391</html>