Merge pull request #21568 from eileenmcnaughton/labels
[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
TO
16
17<center>
cb342529 18 <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
19
20 <!-- BEGIN HEADER -->
21 <!-- You can add table row(s) here with logo or other header elements -->
22 <!-- END HEADER -->
23
24 <!-- BEGIN CONTENT -->
25
26 <tr>
27 <td>
e74e138c 28 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
6a488035 29
ff708ff0 30 {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
6a488035
TO
31 <p>{$event.confirm_email_text|htmlize}</p>
32
33 {else}
12ff7379
EE
34 <p>{ts}Thank you for your registration.{/ts}
35 {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}
36 {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
37
38 {/if}
39
40 <p>
ff708ff0 41 {if !empty($isOnWaitlist)}
6a488035 42 <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
ff708ff0 43 {if !empty($isPrimary)}
0865a4ed 44 <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 45 {/if}
ff708ff0 46 {elseif !empty($isRequireApproval)}
6a488035 47 <p>{ts}Your registration has been submitted.{/ts}</p>
ff708ff0 48 {if !empty($isPrimary)}
0865a4ed 49 <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 50 {/if}
ff708ff0
SL
51 {elseif !empty($is_pay_later) && empty($isAmountzero) && empty($isAdditionalParticipant)}
52 <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
6a488035
TO
53 {/if}
54
55 </td>
56 </tr>
57 <tr>
58 <td>
cb342529 59 <table style="width:100%; max-width:700px; border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
6a488035
TO
60 <tr>
61 <th {$headerStyle}>
62 {ts}Event Information and Location{/ts}
63 </th>
64 </tr>
65 <tr>
66 <td colspan="2" {$valueStyle}>
67 {$event.event_title}<br />
68 {$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}
69 </td>
70 </tr>
71
72
73 {if $conference_sessions}
74 <tr>
75 <td colspan="2" {$labelStyle}>
a235e13c 76 {ts}Your schedule:{/ts}
6a488035
TO
77 </td>
78 </tr>
79 <tr>
80 <td colspan="2" {$valueStyle}>
a235e13c 81 {assign var='group_by_day' value='NA'}
82 {foreach from=$conference_sessions item=session}
83 {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"}
84 {assign var='group_by_day' value=$session.start_date}
6a488035 85 <em>{$group_by_day|date_format:"%m/%d/%Y"}</em><br />
a235e13c 86 {/if}
87 {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}<br />
88 {if $session.location}&nbsp;&nbsp;&nbsp;&nbsp;{$session.location}<br />{/if}
89 {/foreach}
6a488035
TO
90 </td>
91 </tr>
92 {/if}
93
ff708ff0 94 {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
6a488035
TO
95 <tr>
96 <td {$labelStyle}>
97 {ts}Participant Role{/ts}
98 </td>
99 <td {$valueStyle}>
100 {$event.participant_role}
101 </td>
102 </tr>
103 {/if}
104
ff708ff0 105 {if !empty($isShowLocation)}
6a488035
TO
106 <tr>
107 <td colspan="2" {$valueStyle}>
d74c297f 108 {$location.address.1.display|nl2br}
6a488035
TO
109 </td>
110 </tr>
111 {/if}
112
ff708ff0 113 {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
6a488035
TO
114 <tr>
115 <td colspan="2" {$labelStyle}>
116 {ts}Event Contacts:{/ts}
117 </td>
118 </tr>
119 {foreach from=$location.phone item=phone}
120 {if $phone.phone}
121 <tr>
122 <td {$labelStyle}>
123 {if $phone.phone_type}
124 {$phone.phone_type_display}
125 {else}
126 {ts}Phone{/ts}
127 {/if}
128 </td>
129 <td {$valueStyle}>
5d9ebb64 130 {$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
6a488035
TO
131 </td>
132 </tr>
133 {/if}
134 {/foreach}
135 {foreach from=$location.email item=eventEmail}
136 {if $eventEmail.email}
137 <tr>
138 <td {$labelStyle}>
139 {ts}Email{/ts}
140 </td>
141 <td {$valueStyle}>
142 {$eventEmail.email}
143 </td>
144 </tr>
145 {/if}
146 {/foreach}
147 {/if}
7f7fa13a 148
ff708ff0 149 {if !empty($event.is_public)}
278f760d
J
150 <tr>
151 <td colspan="2" {$valueStyle}>
152 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
153 <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
154 </td>
155 </tr>
4de4dbe9 156 {/if}
7f7fa13a 157
ff708ff0 158 {if !empty($event.is_share)}
6a488035
TO
159 <tr>
160 <td colspan="2" {$valueStyle}>
161 {capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&reset=1" a=true fe=1 h=1}{/capture}
162 {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$eventUrl title=$event.title pageURL=$eventUrl}
163 </td>
164 </tr>
165 {/if}
ff708ff0 166 {if !empty($payer.name)}
6a488035
TO
167 <tr>
168 <th {$headerStyle}>
169 {ts}You were registered by:{/ts}
170 </th>
171 </tr>
172 <tr>
173 <td colspan="2" {$valueStyle}>
a235e13c 174 {$payer.name}
6a488035
TO
175 </td>
176 </tr>
177 {/if}
ff708ff0 178 {if !empty($event.is_monetary) and empty($isRequireApproval)}
6a488035
TO
179
180 <tr>
181 <th {$headerStyle}>
ff708ff0 182 {if !empty($event.fee_label)}{$event.fee_label}{/if}
6a488035
TO
183 </th>
184 </tr>
185
ff708ff0 186 {if !empty($lineItem)}
6a488035
TO
187 {foreach from=$lineItem item=value key=priceset}
188 {if $value neq 'skip'}
a221e1e0 189 {if !empty($isPrimary)}
6a488035
TO
190 {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
191 <tr>
192 <td colspan="2" {$labelStyle}>
ff708ff0 193 {ts 1=$priceset+1}Participant %1{/ts} {if !empty($part.$priceset)}{$part.$priceset.info}{/if}
6a488035
TO
194 </td>
195 </tr>
196 {/if}
197 {/if}
198 <tr>
199 <td colspan="2" {$valueStyle}>
200 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
201 <tr>
202 <th>{ts}Item{/ts}</th>
203 <th>{ts}Qty{/ts}</th>
204 <th>{ts}Each{/ts}</th>
ff708ff0 205 {if !empty($dataArray)}
79d001a2
PB
206 <th>{ts}SubTotal{/ts}</th>
207 <th>{ts}Tax Rate{/ts}</th>
208 <th>{ts}Tax Amount{/ts}</th>
209 {/if}
6a488035 210 <th>{ts}Total{/ts}</th>
ff708ff0 211 {if !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
6a488035
TO
212 </tr>
213 {foreach from=$value item=line}
214 <tr>
75b065ce 215 <td {$tdfirstStyle}>
6a488035
TO
216 {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}
217 </td>
75b065ce 218 <td {$tdStyle} align="middle">
6a488035
TO
219 {$line.qty}
220 </td>
75b065ce 221 <td {$tdStyle}>
6a488035
TO
222 {$line.unit_price|crmMoney:$currency}
223 </td>
ff708ff0 224 {if !empty($dataArray)}
75b065ce 225 <td {$tdStyle}>
79d001a2
PB
226 {$line.unit_price*$line.qty|crmMoney}
227 </td>
ff708ff0 228 {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
75b065ce 229 <td {$tdStyle}>
7cf82823
PB
230 {$line.tax_rate|string_format:"%.2f"}%
231 </td>
75b065ce 232 <td {$tdStyle}>
7cf82823
PB
233 {$line.tax_amount|crmMoney}
234 </td>
235 {else}
236 <td></td>
237 <td></td>
238 {/if}
79d001a2 239 {/if}
75b065ce 240 <td {$tdStyle}>
7cf82823 241 {$line.line_total+$line.tax_amount|crmMoney:$currency}
6a488035 242 </td>
ff708ff0 243 {if !empty($pricesetFieldsCount) }<td {$tdStyle}>{$line.participant_count}</td> {/if}
6a488035
TO
244 </tr>
245 {/foreach}
ff708ff0 246 {if !empty($individual)}
75b065ce 247 <tr {$participantTotal}>
248 <td colspan=3>{ts}Participant Total{/ts}</td>
cb342529 249 <td colspan=2>{$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney}</td>
250 <td colspan=1>{$individual.$priceset.totalTaxAmt|crmMoney}</td>
251 <td colspan=2>{$individual.$priceset.totalAmtWithTax|crmMoney}</td>
75b065ce 252 </tr>
253 {/if}
6a488035
TO
254 </table>
255 </td>
256 </tr>
257 {/if}
258 {/foreach}
ff708ff0 259 {if !empty($dataArray)}
141c8460 260 {if isset($totalAmount) and isset($totalTaxAmount)}
79d001a2
PB
261 <tr>
262 <td {$labelStyle}>
263 {ts} Amount Before Tax: {/ts}
264 </td>
265 <td {$valueStyle}>
266 {$totalAmount-$totalTaxAmount|crmMoney}
267 </td>
268 </tr>
141c8460 269 {/if}
79d001a2
PB
270 {foreach from=$dataArray item=value key=priceset}
271 <tr>
7cf82823 272 {if $priceset || $priceset == 0}
b0800b2c 273 <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
7cf82823
PB
274 <td>&nbsp;{$value|crmMoney:$currency}</td>
275 {else}
b0800b2c 276 <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
7cf82823 277 <td>&nbsp;{$value|crmMoney:$currency}</td>
79d001a2 278 {/if}
7cf82823 279 </tr>
79d001a2
PB
280 {/foreach}
281 {/if}
6a488035
TO
282 {/if}
283
ff708ff0 284 {if !empty($amounts) && empty($lineItem)}
6a488035
TO
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
ff708ff0 294 {if isset($totalTaxAmount)}
79d001a2
PB
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}
a221e1e0 304 {if !empty($isPrimary)}
6a488035
TO
305 <tr>
306 <td {$labelStyle}>
307 {ts}Total Amount{/ts}
a235e13c 308 </td>
6a488035 309 <td {$valueStyle}>
ff708ff0 310 {if !empty($totalAmount)}{$totalAmount|crmMoney:$currency}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
6a488035
TO
311 </td>
312 </tr>
ff708ff0 313 {if !empty($pricesetFieldsCount) }
6a488035 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
ff708ff0 346 {if !empty($receive_date)}
6a488035
TO
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
ff708ff0 357 {if !empty($financialTypeName)}
6a488035
TO
358 <tr>
359 <td {$labelStyle}>
360 {ts}Financial Type{/ts}
361 </td>
362 <td {$valueStyle}>
b956b310 363 {$financialTypeName}
6a488035
TO
364 </td>
365 </tr>
366 {/if}
367
ff708ff0 368 {if !empty($trxn_id)}
6a488035
TO
369 <tr>
370 <td {$labelStyle}>
371 {ts}Transaction #{/ts}
372 </td>
373 <td {$valueStyle}>
374 {$trxn_id}
375 </td>
376 </tr>
377 {/if}
378
ff708ff0 379 {if !empty($paidBy)}
6a488035
TO
380 <tr>
381 <td {$labelStyle}>
382 {ts}Paid By{/ts}
383 </td>
384 <td {$valueStyle}>
385 {$paidBy}
386 </td>
387 </tr>
388 {/if}
389
ff708ff0 390 {if !empty($checkNumber)}
6a488035
TO
391 <tr>
392 <td {$labelStyle}>
393 {ts}Check Number{/ts}
394 </td>
395 <td {$valueStyle}>
396 {$checkNumber}
397 </td>
398 </tr>
399 {/if}
400
ff708ff0 401 {if !empty($billingName)}
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
ff708ff0 415 {if !empty($credit_card_type)}
6a488035
TO
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
ff708ff0 435{if !empty($customPre)}
6a488035
TO
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}
ff708ff0 439 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
6a488035
TO
440 <tr>
441 <td {$labelStyle}>{$customName}</td>
442 <td {$valueStyle}>{$customValue}</td>
443 </tr>
444 {/if}
445 {/foreach}
446{/foreach}
447{/if}
448
ff708ff0 449{if !empty($customPost)}
6a488035
TO
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}
ff708ff0 453 {if (!empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
6a488035
TO
454 <tr>
455 <td {$labelStyle}>{$customName}</td>
456 <td {$valueStyle}>{$customValue}</td>
457 </tr>
458{/if}
459{/foreach}
460{/foreach}
461{/if}
462
ff708ff0 463{if !empty($customProfile)}
6a488035
TO
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
6a488035 479 </table>
ff708ff0 480 {if !empty($event.allow_selfcancelxfer) }
e3b510fe 481 <tr>
482 <td colspan="2" {$valueStyle}>
ff708ff0 483 {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 484 {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
485 <a href="{$selfService}">{ts}Click here to transfer or cancel your registration.{/ts}</a>
486 </td>
487 </tr>
488 {/if}
6a488035
TO
489 </table>
490</center>
491
492</body>
493</html>