CRM-12822 : handled phone_ext field display in event online, offline receipt as well...
[civicrm-core.git] / CRM / Upgrade / 4.3.5.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} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
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:$currency}
227 </td>
228 <td>
229 {$line.line_total|crmMoney:$currency}
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:$currency} {$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:$currency} {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
282 {if $register_date}
283 <tr>
284 <td {$labelStyle}>
285 {ts}Registration Date{/ts}
286 </td>
287 <td {$valueStyle}>
288 {$register_date|crmDate}
289 </td>
290 </tr>
291 {/if}
292
293 {if $receive_date}
294 <tr>
295 <td {$labelStyle}>
296 {ts}Transaction Date{/ts}
297 </td>
298 <td {$valueStyle}>
299 {$receive_date|crmDate}
300 </td>
301 </tr>
302 {/if}
303
304 {if $contributionTypeName}
305 <tr>
306 <td {$labelStyle}>
307 {ts}Financial Type{/ts}
308 </td>
309 <td {$valueStyle}>
310 {$contributionTypeName}
311 </td>
312 </tr>
313 {/if}
314
315 {if $trxn_id}
316 <tr>
317 <td {$labelStyle}>
318 {ts}Transaction #{/ts}
319 </td>
320 <td {$valueStyle}>
321 {$trxn_id}
322 </td>
323 </tr>
324 {/if}
325
326 {if $paidBy}
327 <tr>
328 <td {$labelStyle}>
329 {ts}Paid By{/ts}
330 </td>
331 <td {$valueStyle}>
332 {$paidBy}
333 </td>
334 </tr>
335 {/if}
336
337 {if $checkNumber}
338 <tr>
339 <td {$labelStyle}>
340 {ts}Check Number{/ts}
341 </td>
342 <td {$valueStyle}>
343 {$checkNumber}
344 </td>
345 </tr>
346 {/if}
347
348 {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
349 <tr>
350 <th {$headerStyle}>
351 {ts}Billing Name and Address{/ts}
352 </th>
353 </tr>
354 <tr>
355 <td colspan="2" {$valueStyle}>
356 {$billingName}<br />
357 {$address|nl2br}
358 </td>
359 </tr>
360 {/if}
361
362 {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
363 <tr>
364 <th {$headerStyle}>
365 {ts}Credit Card Information{/ts}
366 </th>
367 </tr>
368 <tr>
369 <td colspan="2" {$valueStyle}>
370 {$credit_card_type}<br />
371 {$credit_card_number}<br />
372 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
373 </td>
374 </tr>
375 {/if}
376
377 {/if}
378
379 {/if} {* End of conditional section for Paid events *}
380
381
382 {if $customPre}
383 {foreach from=$customPre item=customPr key=i}
384 <tr> <th {$headerStyle}>{$customPre_grouptitle.$i}</th></tr>
385 {foreach from=$customPr item=customValue key=customName}
386 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
387 <tr>
388 <td {$labelStyle}>{$customName}</td>
389 <td {$valueStyle}>{$customValue}</td>
390 </tr>
391 {/if}
392 {/foreach}
393 {/foreach}
394 {/if}
395
396 {if $customPost}
397 {foreach from=$customPost item=customPos key=j}
398 <tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
399 {foreach from=$customPos item=customValue key=customName}
400 {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
401 <tr>
402 <td {$labelStyle}>{$customName}</td>
403 <td {$valueStyle}>{$customValue}</td>
404 </tr>
405 {/if}
406 {/foreach}
407 {/foreach}
408 {/if}
409
410 {if $customProfile}
411 {foreach from=$customProfile.profile item=eachParticipant key=participantID}
412 <tr><th {$headerStyle}>{ts 1=$participantID+2}Participant %1{/ts} </th></tr>
413 {foreach from=$eachParticipant item=eachProfile key=pid}
414 <tr><th {$headerStyle}>{$customProfile.title.$pid}</th></tr>
415 {foreach from=$eachProfile item=val key=field}
416 <tr>{foreach from=$val item=v key=f}
417 <td {$labelStyle}>{$field}</td>
418 <td {$valueStyle}>{$v}</td>
419 {/foreach}
420 </tr>
421 {/foreach}
422 {/foreach}
423 {/foreach}
424 {/if}
425
426 {if $customGroup}
427 {foreach from=$customGroup item=value key=customName}
428 <tr>
429 <th {$headerStyle}>
430 {$customName}
431 </th>
432 </tr>
433 {foreach from=$value item=v key=n}
434 <tr>
435 <td {$labelStyle}>
436 {$n}
437 </td>
438 <td {$valueStyle}>
439 {$v}
440 </td>
441 </tr>
442 {/foreach}
443 {/foreach}
444 {/if}
445
446 </table>
447 </td>
448 </tr>
449 </table>
450 </center>
451
452 </body>
453 </html>