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