Merge pull request #3799 from routinet/patch-1
[civicrm-core.git] / xml / templates / message_templates / event_offline_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="620" 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 $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
26 <p>{$event.confirm_email_text|htmlize}</p>
27 {/if}
28
29 {if $isOnWaitlist}
30 <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
31 {if $isPrimary}
32 <p>{ts}If space becomes available you will receive an email with
33a link to a web page where you can complete your registration.{/ts}</p>
34 {/if}
35 {elseif $isRequireApproval}
36 <p>{ts}Your registration has been submitted.{/ts}</p>
37 {if $isPrimary}
38 <p>{ts}Once your registration has been reviewed, you will receive
39an email with a link to a web page where you can complete the
40registration process.{/ts}</p>
41 {/if}
42 {elseif $is_pay_later}
43 <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
44 {else}
45 <p>{ts}Please print this confirmation for your records.{/ts}</p>
46 {/if}
47
48 </td>
49 </tr>
50 <tr>
51 <td>
52 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
53 <tr>
54 <th {$headerStyle}>
55 {ts}Event Information and Location{/ts}
56 </th>
57 </tr>
58 <tr>
59 <td colspan="2" {$valueStyle}>
60 {$event.event_title}<br />
61 {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
62 </td>
63 </tr>
64
65 {if $event.participant_role neq 'Attendee' and $defaultRole}
66 <tr>
67 <td {$labelStyle}>
68 {ts}Participant Role{/ts}
69 </td>
70 <td {$valueStyle}>
71 {$event.participant_role}
72 </td>
73 </tr>
74 {/if}
75
76 {if $isShowLocation}
77 <tr>
78 <td colspan="2" {$valueStyle}>
79 {if $location.address.1.name}
80 {$location.address.1.name}<br />
81 {/if}
82 {if $location.address.1.street_address}
83 {$location.address.1.street_address}<br />
84 {/if}
85 {if $location.address.1.supplemental_address_1}
86 {$location.address.1.supplemental_address_1}<br />
87 {/if}
88 {if $location.address.1.supplemental_address_2}
89 {$location.address.1.supplemental_address_2}<br />
90 {/if}
91 {if $location.address.1.city}
92 {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
93 {/if}
94 </td>
95 </tr>
96 {/if}
97
98 {if $location.phone.1.phone || $location.email.1.email}
99 <tr>
100 <td colspan="2" {$labelStyle}>
101 {ts}Event Contacts:{/ts}
102 </td>
103 </tr>
104 {foreach from=$location.phone item=phone}
105 {if $phone.phone}
106 <tr>
107 <td {$labelStyle}>
108 {if $phone.phone_type}
109 {$phone.phone_type_display}
110 {else}
111 {ts}Phone{/ts}
112 {/if}
113 </td>
114 <td {$valueStyle}>
5d9ebb64 115 {$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
6a488035
TO
116 </td>
117 </tr>
118 {/if}
119 {/foreach}
120 {foreach from=$location.email item=eventEmail}
121 {if $eventEmail.email}
122 <tr>
123 <td {$labelStyle}>
124 {ts}Email{/ts}
125 </td>
126 <td {$valueStyle}>
127 {$eventEmail.email}
128 </td>
129 </tr>
130 {/if}
131 {/foreach}
132 {/if}
278f760d 133
4de4dbe9 134 {if $event.is_public}
278f760d
J
135 <tr>
136 <td colspan="2" {$valueStyle}>
137 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
138 <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
139 </td>
140 </tr>
4de4dbe9 141 {/if}
278f760d 142
6a488035
TO
143 {if $email}
144 <tr>
145 <th {$headerStyle}>
146 {ts}Registered Email{/ts}
147 </th>
148 </tr>
149 <tr>
150 <td colspan="2" {$valueStyle}>
151 {$email}
152 </td>
153 </tr>
154 {/if}
155
156
157 {if $event.is_monetary}
158
159 <tr>
160 <th {$headerStyle}>
161 {$event.fee_label}
162 </th>
163 </tr>
164
165 {if $lineItem}
166 {foreach from=$lineItem item=value key=priceset}
167 {if $value neq 'skip'}
168 {if $isPrimary}
169 {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
170 <tr>
171 <td colspan="2" {$labelStyle}>
172 {ts 1=$priceset+1}Participant %1{/ts}
173 </td>
174 </tr>
175 {/if}
176 {/if}
177 <tr>
178 <td colspan="2" {$valueStyle}>
179 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
180 <tr>
181 <th>{ts}Item{/ts}</th>
182 <th>{ts}Qty{/ts}</th>
183 <th>{ts}Each{/ts}</th>
184 <th>{ts}Total{/ts}</th>
011aeb62 185 {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
6a488035
TO
186 </tr>
187 {foreach from=$value item=line}
188 <tr>
189 <td>
011aeb62 190 {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}
6a488035
TO
191 </td>
192 <td>
193 {$line.qty}
194 </td>
195 <td>
196 {$line.unit_price|crmMoney}
197 </td>
198 <td>
199 {$line.line_total|crmMoney}
200 </td>
011aeb62 201 {if $pricesetFieldsCount }
202 <td>
203 {$line.participant_count}
6a488035 204 </td>
011aeb62 205 {/if}
6a488035
TO
206 </tr>
207 {/foreach}
208 </table>
209 </td>
210 </tr>
211 {/if}
212 {/foreach}
213 {/if}
214
215 {if $amount && !$lineItem}
216 {foreach from=$amount item=amnt key=level}
217 <tr>
218 <td colspan="2" {$valueStyle}>
219 {$amnt.amount|crmMoney} {$amnt.label}
220 </td>
221 </tr>
222 {/foreach}
223 {/if}
224 {if $isPrimary}
225 <tr>
226 <td {$labelStyle}>
81f3d017
PJ
227 {if $balanceAmount}
228 {ts}Total Paid{/ts}
229 {else}
230 {ts}Total Amount{/ts}
231 {/if}
6a488035
TO
232 </td>
233 <td {$valueStyle}>
234 {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
235 </td>
236 </tr>
81f3d017
PJ
237 {if $balanceAmount}
238 <tr>
239 <td {$labelStyle}>
240 {ts}Balance{/ts}
241 </td>
242 <td {$valueStyle}>
243 {$balanceAmount|crmMoney}
244 </td>
245 </tr>
246 {/if}
6a488035
TO
247 {if $pricesetFieldsCount }
248 <tr>
011aeb62 249 <td {$labelStyle}>
250 {ts}Total Participants{/ts}</td>
6a488035 251 <td {$valueStyle}>
011aeb62 252 {assign var="count" value= 0}
6a488035
TO
253 {foreach from=$lineItem item=pcount}
254 {assign var="lineItemCount" value=0}
255 {if $pcount neq 'skip'}
256 {foreach from=$pcount item=p_count}
257 {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
258 {/foreach}
259 {if $lineItemCount < 1 }
260 assign var="lineItemCount" value=1}
011aeb62 261 {/if}
6a488035
TO
262 {assign var="count" value=$count+$lineItemCount}
263 {/if}
264 {/foreach}
011aeb62 265 {$count}
6a488035
TO
266 </td>
267 </tr>
268 {/if}
269 {if $is_pay_later}
270 <tr>
271 <td colspan="2" {$labelStyle}>
272 {$pay_later_receipt}
273 </td>
274 </tr>
275 {/if}
276
277 {if $register_date}
278 <tr>
279 <td {$labelStyle}>
280 {ts}Registration Date{/ts}
281 </td>
282 <td {$valueStyle}>
283 {$register_date|crmDate}
284 </td>
285 </tr>
286 {/if}
287
288 {if $receive_date}
289 <tr>
290 <td {$labelStyle}>
291 {ts}Transaction Date{/ts}
292 </td>
293 <td {$valueStyle}>
294 {$receive_date|crmDate}
295 </td>
296 </tr>
297 {/if}
298
299 {if $contributionTypeName}
300 <tr>
301 <td {$labelStyle}>
302 {ts}Financial Type{/ts}
303 </td>
304 <td {$valueStyle}>
305 {$contributionTypeName}
306 </td>
307 </tr>
308 {/if}
309
310 {if $trxn_id}
311 <tr>
312 <td {$labelStyle}>
313 {ts}Transaction #{/ts}
314 </td>
315 <td {$valueStyle}>
316 {$trxn_id}
317 </td>
318 </tr>
319 {/if}
320
321 {if $paidBy}
322 <tr>
323 <td {$labelStyle}>
324 {ts}Paid By{/ts}
325 </td>
326 <td {$valueStyle}>
327 {$paidBy}
328 </td>
329 </tr>
330 {/if}
331
332 {if $checkNumber}
333 <tr>
334 <td {$labelStyle}>
335 {ts}Check Number{/ts}
336 </td>
337 <td {$valueStyle}>
338 {$checkNumber}
339 </td>
340 </tr>
341 {/if}
342
343 {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
344 <tr>
345 <th {$headerStyle}>
346 {ts}Billing Name and Address{/ts}
347 </th>
348 </tr>
349 <tr>
350 <td colspan="2" {$valueStyle}>
351 {$billingName}<br />
352 {$address|nl2br}
353 </td>
354 </tr>
355 {/if}
356
357 {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
358 <tr>
359 <th {$headerStyle}>
360 {ts}Credit Card Information{/ts}
361 </th>
362 </tr>
363 <tr>
364 <td colspan="2" {$valueStyle}>
365 {$credit_card_type}<br />
366 {$credit_card_number}<br />
367 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
368 </td>
369 </tr>
370 {/if}
371
372 {/if}
373
374 {/if} {* End of conditional section for Paid events *}
375
376 {if $customPre}
377 <tr>
378 <th {$headerStyle}>
379 {$customPre_grouptitle}
380 </th>
381 </tr>
382 {foreach from=$customPre item=value key=customName}
383 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
384 <tr>
385 <td {$labelStyle}>
386 {$customName}
387 </td>
388 <td {$valueStyle}>
389 {$value}
390 </td>
391 </tr>
392 {/if}
393 {/foreach}
394 {/if}
395
396 {if $customPost}
397 <tr>
398 <th {$headerStyle}>
399 {$customPost_grouptitle}
400 </th>
401 </tr>
402 {foreach from=$customPost item=value key=customName}
403 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
404 <tr>
405 <td {$labelStyle}>
406 {$customName}
407 </td>
408 <td {$valueStyle}>
409 {$value}
410 </td>
411 </tr>
412 {/if}
413 {/foreach}
414 {/if}
415
416 {if $customProfile}
417 {foreach from=$customProfile item=value key=customName}
418 <tr>
419 <th {$headerStyle}>
420 {ts 1=$customName+1}Participant Information - Participant %1{/ts}
421 </th>
422 </tr>
423 {foreach from=$value item=val key=field}
424 {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
425 <tr>
426 <td colspan="2" {$labelStyle}>
427 {if $field eq 'additionalCustomPre'}
428 {$additionalCustomPre_grouptitle}
429 {else}
430 {$additionalCustomPost_grouptitle}
431 {/if}
432 </td>
433 </tr>
434 {foreach from=$val item=v key=f}
435 <tr>
436 <td {$labelStyle}>
437 {$f}
438 </td>
439 <td {$valueStyle}>
440 {$v}
441 </td>
442 </tr>
443 {/foreach}
444 {/if}
445 {/foreach}
446 {/foreach}
447 {/if}
448
449 {if $customGroup}
450 {foreach from=$customGroup item=value key=customName}
451 <tr>
452 <th {$headerStyle}>
453 {$customName}
454 </th>
455 </tr>
456 {foreach from=$value item=v key=n}
457 <tr>
458 <td {$labelStyle}>
459 {$n}
460 </td>
461 <td {$valueStyle}>
462 {$v}
463 </td>
464 </tr>
465 {/foreach}
466 {/foreach}
467 {/if}
468
469 </table>
470 </td>
471 </tr>
472
473 </table>
474</center>
475
476</body>
477</html>