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