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