Merge pull request #2061 from civicrm/4.3
[civicrm-core.git] / CRM / Upgrade / 4.1.alpha1.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 $email}
176 <tr>
177 <th {$headerStyle}>
178 {ts}Registered Email{/ts}
179 </th>
180 </tr>
181 <tr>
182 <td colspan="2" {$valueStyle}>
183 {$email}
184 </td>
185 </tr>
186 {/if}
187 {if $payer.name}
188 <tr>
189 <th {$headerStyle}>
190 {ts}You were registered by:{/ts}
191 </th>
192 </tr>
193 <tr>
194 <td colspan="2" {$valueStyle}>
195 {$payer.name}
196 </td>
197 </tr>
198 {/if}
199 {if $event.is_monetary}
200
201 <tr>
202 <th {$headerStyle}>
203 {$event.fee_label}
204 </th>
205 </tr>
206
207 {if $lineItem}
208 {foreach from=$lineItem item=value key=priceset}
209 {if $value neq 'skip'}
210 {if $isPrimary}
211 {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
212 <tr>
213 <td colspan="2" {$labelStyle}>
214 {ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
215 </td>
216 </tr>
217 {/if}
218 {/if}
219 <tr>
220 <td colspan="2" {$valueStyle}>
221 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
222 <tr>
223 <th>{ts}Item{/ts}</th>
224 <th>{ts}Qty{/ts}</th>
225 <th>{ts}Each{/ts}</th>
226 <th>{ts}Total{/ts}</th>
227 {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
228 </tr>
229 {foreach from=$value item=line}
230 <tr>
231 <td>
232 {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}
233 </td>
234 <td>
235 {$line.qty}
236 </td>
237 <td>
238 {$line.unit_price|crmMoney}
239 </td>
240 <td>
241 {$line.line_total|crmMoney}
242 </td>
243 {if $pricesetFieldsCount }<td>{$line.participant_count}</td> {/if}
244 </tr>
245 {/foreach}
246 </table>
247 </td>
248 </tr>
249 {/if}
250 {/foreach}
251 {/if}
252
253 {if $amount && !$lineItem}
254 {foreach from=$amount item=amnt key=level}
255 <tr>
256 <td colspan="2" {$valueStyle}>
257 {$amnt.amount|crmMoney} {$amnt.label}
258 </td>
259 </tr>
260 {/foreach}
261 {/if}
262
263 {if $isPrimary}
264 <tr>
265 <td {$labelStyle}>
266 {ts}Total Amount{/ts}
267 </td>
268 <td {$valueStyle}>
269 {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
270 </td>
271 </tr>
272 {if $pricesetFieldsCount }
273 <tr>
274 <td {$labelStyle}>
275 {ts}Total Participants{/ts}</td>
276 <td {$valueStyle}>
277 {assign var="count" value= 0}
278 {foreach from=$lineItem item=pcount}
279 {assign var="lineItemCount" value=0}
280 {if $pcount neq 'skip'}
281 {foreach from=$pcount item=p_count}
282 {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
283 {/foreach}
284 {if $lineItemCount < 1 }
285 {assign var="lineItemCount" value=1}
286 {/if}
287 {assign var="count" value=$count+$lineItemCount}
288 {/if}
289 {/foreach}
290 {$count}
291 </td> </tr>
292 {/if}
293 {if $is_pay_later}
294 <tr>
295 <td colspan="2" {$labelStyle}>
296 {$pay_later_receipt}
297 </td>
298 </tr>
299 {/if}
300
301 {if $register_date}
302 <tr>
303 <td {$labelStyle}>
304 {ts}Registration Date{/ts}
305 </td>
306 <td {$valueStyle}>
307 {$register_date|crmDate}
308 </td>
309 </tr>
310 {/if}
311
312 {if $receive_date}
313 <tr>
314 <td {$labelStyle}>
315 {ts}Transaction Date{/ts}
316 </td>
317 <td {$valueStyle}>
318 {$receive_date|crmDate}
319 </td>
320 </tr>
321 {/if}
322
323 {if $contributionTypeName}
324 <tr>
325 <td {$labelStyle}>
326 {ts}Contribution Type{/ts}
327 </td>
328 <td {$valueStyle}>
329 {$contributionTypeName}
330 </td>
331 </tr>
332 {/if}
333
334 {if $trxn_id}
335 <tr>
336 <td {$labelStyle}>
337 {ts}Transaction #{/ts}
338 </td>
339 <td {$valueStyle}>
340 {$trxn_id}
341 </td>
342 </tr>
343 {/if}
344
345 {if $paidBy}
346 <tr>
347 <td {$labelStyle}>
348 {ts}Paid By{/ts}
349 </td>
350 <td {$valueStyle}>
351 {$paidBy}
352 </td>
353 </tr>
354 {/if}
355
356 {if $checkNumber}
357 <tr>
358 <td {$labelStyle}>
359 {ts}Check Number{/ts}
360 </td>
361 <td {$valueStyle}>
362 {$checkNumber}
363 </td>
364 </tr>
365 {/if}
366
367 {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
368 <tr>
369 <th {$headerStyle}>
370 {ts}Billing Name and Address{/ts}
371 </th>
372 </tr>
373 <tr>
374 <td colspan="2" {$valueStyle}>
375 {$billingName}<br />
376 {$address|nl2br}
377 </td>
378 </tr>
379 {/if}
380
381 {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
382 <tr>
383 <th {$headerStyle}>
384 {ts}Credit Card Information{/ts}
385 </th>
386 </tr>
387 <tr>
388 <td colspan="2" {$valueStyle}>
389 {$credit_card_type}<br />
390 {$credit_card_number}<br />
391 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
392 </td>
393 </tr>
394 {/if}
395
396 {/if}
397
398 {/if} {* End of conditional section for Paid events *}
399
400
401 {if $customPre}
402 {foreach from=$customPre item=customPr key=i}
403 <tr> <th {$headerStyle}>{$customPre_grouptitle.$i}</th></tr>
404 {foreach from=$customPr item=customValue key=customName}
405 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
406 <tr>
407 <td {$labelStyle}>{$customName}</td>
408 <td {$valueStyle}>{$customValue}</td>
409 </tr>
410 {/if}
411 {/foreach}
412 {/foreach}
413 {/if}
414
415 {if $customPost}
416 {foreach from=$customPost item=customPos key=j}
417 <tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
418 {foreach from=$customPos item=customValue key=customName}
419 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
420 <tr>
421 <td {$labelStyle}>{$customName}</td>
422 <td {$valueStyle}>{$customValue}</td>
423 </tr>
424 {/if}
425 {/foreach}
426 {/foreach}
427 {/if}
428
429 {if $customProfile}
430 {foreach from=$customProfile.profile item=eachParticipant key=participantID}
431 <tr><th {$headerStyle}>{ts 1=$participantID+2}Participant Information - Participant %1{/ts} </th></tr>
432 {foreach from=$eachParticipant item=eachProfile key=pid}
433 <tr><th {$headerStyle}>{$customProfile.title.$pid}</th></tr>
434 {foreach from=$eachProfile item=val key=field}
435 <tr>{foreach from=$val item=v key=f}
436 <td {$labelStyle}>{$field}</td>
437 <td {$valueStyle}>{$v}</td>
438 {/foreach}
439 </tr>
440 {/foreach}
441 {/foreach}
442 {/foreach}
443 {/if}
444
445 {if $customGroup}
446 {foreach from=$customGroup item=value key=customName}
447 <tr>
448 <th {$headerStyle}>
449 {$customName}
450 </th>
451 </tr>
452 {foreach from=$value item=v key=n}
453 <tr>
454 <td {$labelStyle}>
455 {$n}
456 </td>
457 <td {$valueStyle}>
458 {$v}
459 </td>
460 </tr>
461 {/foreach}
462 {/foreach}
463 {/if}
464
465 </table>
466 </td>
467 </tr>
468 </table>
469 </center>
470
471 </body>
472 </html>