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