CRM-16555 include BillingBlockWrapper as part of refactoring forms to have same behaviour
[civicrm-core.git] / templates / CRM / Event / Cart / Form / Checkout / Payment.tpl
1 {include file="CRM/common/TrackingFields.tpl"}
2
3 <table>
4 <thead>
5 <tr>
6 <th class="event-title">
7 {ts}Event{/ts}
8 </th>
9 <th class="participants-column">
10 {ts}Participants{/ts}
11 </th>
12 <th class="cost">
13 {ts}Price{/ts}
14 </th>
15 <th class="amount">
16 {ts}Total{/ts}
17 </th>
18 </tr>
19 </thead>
20 <tbody>
21 {foreach from=$line_items item=line_item}
22 <tr class="event-line-item {$line_item.class}">
23 <td class="event-title">
24 {$line_item.event->title} ({$line_item.event->start_date})
25 </td>
26 <td class="participants-column">
27 {$line_item.num_participants}<br/>
28 {if $line_item.num_participants > 0}
29 <div class="participants" style="padding-left: 10px;">
30 {foreach from=$line_item.participants item=participant}
31 {$participant.display_name}<br />
32 {/foreach}
33 </div>
34 {/if}
35 {if $line_item.num_waiting_participants > 0}
36 {ts}Waitlisted:{/ts}<br/>
37 <div class="participants" style="padding-left: 10px;">
38 {foreach from=$line_item.waiting_participants item=participant}
39 {$participant.display_name}<br />
40 {/foreach}
41 </div>
42 {/if}
43 </td>
44 <td class="cost">
45 {$line_item.cost|crmMoney:$currency|string_format:"%10s"}
46 </td>
47 <td class="amount">
48 &nbsp;{$line_item.amount|crmMoney:$currency|string_format:"%10s"}
49 </td>
50 </tr>
51 {/foreach}
52 </tbody>
53 <tfoot>
54 {if $discounts}
55 <tr>
56 <td>
57 </td>
58 <td>
59 </td>
60 <td>
61 {ts}Subtotal:{/ts}
62 </td>
63 <td>
64 &nbsp;{$sub_total|crmMoney:$currency|string_format:"%10s"}
65 </td>
66 </tr>
67 {foreach from=$discounts key=myId item=i}
68 <tr>
69 <td>{$i.title}
70 </td>
71 <td>
72 </td>
73 <td>
74 </td>
75 <td>
76 -{$i.amount|crmMoney:$currency|string_format:"%10s"}
77 </td>
78 </tr>
79 {/foreach}
80 {/if}
81 <tr>
82 <td>
83 </td>
84 <td>
85 </td>
86 <td class="total">
87 {ts}Total:{/ts}
88 </td>
89 <td class="total">
90 &nbsp;{$total|crmMoney:$currency|string_format:"%10s"}
91 </td>
92 </tr>
93 </tfoot>
94 </table>
95 {if $payment_required == true}
96 <div class="crm-section {$form.is_pay_later.name}-section">
97 <div class="label">{$form.is_pay_later.label}</div>
98 <div class="content">{$form.is_pay_later.html}
99 </div>
100 <div class="clear"></div>
101 </div>
102 <div class="pay-later-instructions" style="display:none">
103 {$pay_later_instructions}
104 </div>
105 {include file='CRM/Core/BillingBlockWrapper.tpl'}
106 {/if}
107 {if $collect_billing_email == true}
108 <div class="crm-section {$form.billing_contact_email.name}-section">
109 <div class="label">{$form.billing_contact_email.label}</div>
110 <div class="content">{$form.billing_contact_email.html}
111 </div>
112 <div class="clear"></div>
113 </div>
114 {/if}
115
116 {if $administrator}
117 <!--
118 <div style="border: 1px solid blue; padding: 5px;">
119 <b>{ts}Staff use only{/ts}</b>
120 <div class="crm-section {$form.note.name}-section">
121 <div class="label">{$form.note.label}</div>
122 <div class="content">{$form.note.html}
123 <div class="description">{ts}Note that will be sent to the billing customer.{/ts}</div>
124 </div>
125 <div class="clear"></div>
126 </div>
127 <div class="crm-section {$form.source.name}-section">
128 <div class="label">{$form.source.label}</div>
129 <div class="content">{$form.source.html}
130 <div class="description">{ts}Description of this transaction.{/ts}</div>
131 </div>
132 <div class="clear"></div>
133 </div>
134 <div class="crm-section {$form.payment_type.name}-section">
135 <div class="label">{$form.payment_type.label}</div>
136 <div class="content">{$form.payment_type.html}
137 </div>
138 <div class="clear"></div>
139 </div>
140 <div class="crm-section {$form.check_number.name}-section" style="display: none;">
141 <div class="label">{$form.check_number.label}</div>
142 <div class="content">{$form.check_number.html}</div>
143 <div class="clear"></div>
144 </div>
145 <div class="crm-section {$form.is_pending.name}-section">
146 <div class="label">{$form.is_pending.label}</div>
147 <div class="content">{$form.is_pending.html}
148 </div>
149 <div class="clear"></div>
150 </div>
151 </div>
152 -->
153 {/if}
154
155 <script type="text/javascript">
156 var pay_later_sel = "input#{$form.is_pay_later.name}";
157 {literal}
158 CRM.$(function($) {
159 function refresh() {
160 var is_pay_later = $(pay_later_sel).prop("checked");
161 $(".credit_card_info-group").toggle(!is_pay_later);
162 $(".pay-later-instructions").toggle(is_pay_later);
163 $("div.billingNameInfo-section .description").html(is_pay_later ? "Enter the billing address at which you can be invoiced." : "Enter the name as shown on your credit or debit card, and the billing address for this card.");
164 }
165 $("input#source").prop('disabled', true);
166
167 $(pay_later_sel).change(function() {
168 refresh();
169 });
170 $(".payment_type-section :radio").change(function() {
171 var sel = $(this).attr("id");
172 $(".check_number-section").toggle(
173 $(this).is(":checked") &&
174 $("label[for="+sel+"]").html() == "{/literal}{ts escape='js'}Check{/ts}{literal}"
175 );
176 });
177 refresh();
178 });
179 {/literal}
180 </script>
181
182 <div id="crm-submit-buttons" class="crm-submit-buttons">
183 {include file="CRM/common/formButtons.tpl" location="bottom"}
184 </div>
185
186 {include file="CRM/Event/Cart/Form/viewCartLink.tpl"}