2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2017 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 {assign var=isRecordPayment value=1 }
27 {if $paid} {* We retrieve this tpl when event is selected - keep it empty if event is not paid *}
28 <table class="form-layout">
30 {if $discount and $hasPayment}
31 <tr class="crm-event-eventfees-form-block-discount"><td class="label"> {ts}Discount Set{/ts}</td><td class="view-value">{$discount}</td></tr>
32 {elseif $form.discount_id.label}
33 <tr class="crm-event-eventfees-form-block-discount_id"><td class="label"> {$form.discount_id.label}</td><td>{$form.discount_id.html}</td></tr>
35 {if $action eq 2 and $hasPayment} {* Updating *}
37 <tr class="crm-event-eventfees-form-block-line_items">
38 <td class="label">{ts}Selections{/ts}</td>
39 <td>{include file="CRM/Price/Page/LineItem.tpl" context="Event"}</td>
42 <tr class="crm-event-eventfees-form-block-event_level">
43 <td class="label">{ts}Event Level{/ts}</td>
44 <td>{$fee_level} {if $fee_amount}- {$fee_amount|crmMoney:$fee_currency}{/if}</td>
50 <a class="action-item crm-hover-button" href='{crmURL p="civicrm/event/participant/feeselection" q="reset=1&id=`$participantId`&cid=`$contactId`&action=update"}'><i class="crm-i fa-pencil"></i> {ts}Change Selections{/ts}</a>
53 {else} {* New participant *}
55 <fieldset id="priceset" class="crm-group priceset-group">
56 <tr class="crm-event-eventfees-form-block-price_set_amount">
57 <td class="label" style="padding-top: 10px;">{$form.amount.label}</td>
58 <td class="view-value"><table class="form-layout">{include file="CRM/Price/Form/PriceSet.tpl" extends="Event"}</td>
61 {assign var=isRecordPayment value=0 }
62 <div class='messages status'>{ts}No active price fields found for this event!{/ts}</div>
70 {if $accessContribution and ! $participantMode and ($action neq 2 or !$rows.0.contribution_id or $onlinePendingContributionId) and $isRecordPayment and ! $registeredByParticipantId }
71 <tr class="crm-event-eventfees-form-block-record_contribution">
72 <td class="label">{$form.record_contribution.label}</td>
73 <td>{$form.record_contribution.html}<br />
74 <span class="description">{ts}Check this box to enter payment information. You will also be able to generate a customized receipt.{/ts}</span>
77 <tr id="payment_information" class="crm-event-eventfees-form-block-payment_information">
78 <td class ='html-adjust' colspan=2>
79 <fieldset><legend>{ts}Payment Information{/ts}</legend>
80 <table id="recordContribution" class="form-layout" style="width:auto;">
81 <tr class="crm-event-eventfees-form-block-financial_type_id">
82 <td class="label">{$form.financial_type_id.label}<span class="crm-marker"> *</span></td>
83 <td>{$form.financial_type_id.html}<br /><span class="description">{ts}Select the appropriate financial type for this payment.{/ts}</span></td>
85 <tr class="crm-event-eventfees-form-block-total_amount"><td class="label">{$form.total_amount.label}</td><td>{$form.total_amount.html|crmMoney:$currency}</td></tr>
87 <td class="label" >{$form.receive_date.label}</td>
88 <td>{include file="CRM/common/jcalendar.tpl" elementName=receive_date}</td>
90 <tr class="crm-event-eventfees-form-block-payment_instrument_id"><td class="label">{$form.payment_instrument_id.label}<span class="crm-marker"> *</span></td><td>{$form.payment_instrument_id.html} {help id="payment_instrument_id" file="CRM/Contribute/Page/Tab.hlp"}</td></tr>
91 {if $showTransactionId }
92 <tr class="crm-event-eventfees-form-block-trxn_id"><td class="label">{$form.trxn_id.label}</td><td>{$form.trxn_id.html}</td></tr>
94 <tr class="crm-event-eventfees-form-block-contribution_status_id"><td class="label">{$form.contribution_status_id.label}</td><td>{$form.contribution_status_id.html}</td></tr>
105 {include file='CRM/Core/BillingBlockWrapper.tpl'}
108 {if ($email OR $batchEmail) and $outBound_option != 2}
109 <fieldset id="send_confirmation_receipt"><legend>{if $paid}{ts}Registration Confirmation and Receipt{/ts}{else}{ts}Registration Confirmation{/ts}{/if}</legend>
110 <table class="form-layout" style="width:auto;">
111 <tr class="crm-event-eventfees-form-block-send_receipt">
112 <td class="label">{if $paid}{ts}Send Confirmation and Receipt{/ts}{else}{ts}Send Confirmation{/ts}{/if}</td>
113 <td>{$form.send_receipt.html}<br>
115 <span class="description">{ts 1=$email}Automatically email a confirmation and receipt to %1?{/ts}</span></td>
117 <span class="description">{ts 1=$email}Automatically email a confirmation to %1?{/ts}</span></td>
120 <tr id="from-email" class="crm-event-eventfees-form-block-from_email_address">
121 <td class="label">{$form.from_email_address.label}</td>
122 <td>{$form.from_email_address.html} {help id ="id-from_email" file="CRM/Contact/Form/Task/Email.hlp"}</td>
124 <tr id='notice' class="crm-event-eventfees-form-block-receipt_text">
125 <td class="label">{$form.receipt_text.label}</td>
126 <td><span class="description">
127 {ts}Enter a message you want included at the beginning of the confirmation email. EXAMPLE: 'Thanks for registering for this event.'{/ts}
129 {$form.receipt_text.html|crmAddClass:huge}
134 {elseif $context eq 'standalone' and $outBound_option != 2 }
135 <fieldset id="email-receipt" style="display:none;"><legend>{if $paid}{ts}Registration Confirmation and Receipt{/ts}{else}{ts}Registration Confirmation{/ts}{/if}</legend>
136 <table class="form-layout" style="width:auto;">
137 <tr class="crm-event-eventfees-form-block-send_receipt">
138 <td class="label">{if $paid}{ts}Send Confirmation and Receipt{/ts}{else}{ts}Send Confirmation{/ts}{/if}</td>
139 <td>{$form.send_receipt.html}<br>
141 <span class="description">{ts 1='<span id="email-address"></span>'}Automatically email a confirmation and receipt to %1?{/ts}</span>
143 <span class="description">{ts 1='<span id="email-address"></span>'}Automatically email a confirmation to %1?{/ts}</span>
147 <tr id="from-email" class="crm-event-eventfees-form-block-from_email_address">
148 <td class="label">{$form.from_email_address.label}</td>
149 <td>{$form.from_email_address.html} {help id ="id-from_email" file="CRM/Contact/Form/Task/Email.hlp"}</td>
151 <tr id='notice' class="crm-event-eventfees-form-block-receipt_text">
152 <td class="label">{$form.receipt_text.label}</td>
153 <td><span class="description">
154 {ts}Enter a message you want included at the beginning of the confirmation email. EXAMPLE: 'Thanks for registering for this event.'{/ts}
156 {$form.receipt_text.html|crmAddClass:huge}</td>
162 {if ($email and $outBound_option != 2) OR $context eq 'standalone' } {* Send receipt field only present if contact has a valid email address. *}
163 {include file="CRM/common/showHideByFieldValue.tpl"
164 trigger_field_id ="send_receipt"
166 target_element_id ="notice"
167 target_element_type ="table-row"
171 {include file="CRM/common/showHideByFieldValue.tpl"
172 trigger_field_id ="send_receipt"
174 target_element_id ="from-email"
175 target_element_type ="table-row"
181 {if $context eq 'standalone' and $outBound_option != 2 }
182 <script type="text/javascript">
185 var $form = $("form.{/literal}{$form.formClass}{literal}");
186 $("#contact_id", $form).change(checkEmail);
189 function checkEmail( ) {
190 var data = $("#contact_id", $form).select2('data');
191 if (data && data.extra && data.extra.email && data.extra.email.length) {
192 $("#email-receipt", $form).show();
193 if ($("#send_receipt", $form).is(':checked')) {
194 $("#notice", $form).show();
196 $("#email-address", $form).html(data.extra.email);
199 $("#email-receipt, #notice", $form).hide();
207 {if $onlinePendingContributionId}
208 <script type="text/javascript">
210 function confirmStatus( pStatusId, cStatusId ) {
211 if ( (pStatusId == cj("#status_id").val() ) && (cStatusId == cj("#contribution_status_id").val()) ) {
212 var allow = confirm( '{/literal}{ts escape='js'}The Payment Status for this participant is Completed. The Participant Status is set to Pending (pay later). Click Cancel if you want to review or modify these values before saving this record{/ts}{literal}.' );
213 if ( !allow ) return false;
217 function checkCancelled( statusId, pStatusId, cStatusId ) {
218 //selected participant status is 'cancelled'
219 if ( statusId == pStatusId ) {
220 cj("#contribution_status_id").val( cStatusId );
222 //unset value for send receipt check box.
223 cj("#send_receipt").prop("checked", false );
224 cj("#send_confirmation_receipt").hide( );
226 // set receive data to null.
227 clearDateTime( 'receive_date' );
229 cj("#send_confirmation_receipt").show( );
237 {if $showFeeBlock && $feeBlockPaid && ! $priceSet && $action neq 2}
242 function fillTotalAmount( totalAmount ) {
243 if ( !totalAmount ) {
244 var amountVal = {/literal}{if $form.amount.value}{$form.amount.value}{else}0{/if}{literal};
245 if ( amountVal > 0 ) {
246 var eventFeeBlockValues = {/literal}{$eventFeeBlockValues}{literal};
247 totalAmount = eval('eventFeeBlockValues.amount_id_'+ amountVal);
252 cj('#total_amount').val( totalAmount );