2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 +--------------------------------------------------------------------+
27 {include file="CRM/Contribute/Form/AdditionalInfo/$formType.tpl"}
30 <h3>{if $component eq 'event'}{if $contributionMode}{ts}Credit Card Event Payment{/ts}{else}{ts}New Event Payement{/ts}{/if}{/if}</h3>
32 <div class="crm-block crm-form-block crm-payment-form-block">
34 {if $contributionMode == 'test'}
35 {assign var=contribMode value="TEST"}
36 {elseif $contributionMode == 'live'}
37 {assign var=contribMode value="LIVE"}
41 <div class="messages status no-popup">
42 <div class="icon inform-icon"></div> {ts}You will not be able to send an automatic email receipt for this payment because there is no email address recorded for this contact. If you want a receipt to be sent when this payment is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the payment.{/ts}
45 <div class="crm-submit-buttons">
46 {include file="CRM/common/formButtons.tpl"}
47 {if $newCredit AND $contributionMode EQ null}
49 {capture assign=ccModeLink}{crmURL p='civicrm/payment/add' q="reset=1&action=add&cid=`$contactId`&id=`$id`&component=`$component`&mode=live"}{/capture}
51 <span class="action-link crm-link-credit-card-mode"> <a href="{$ccModeLink}">» {ts}submit credit card payment{/ts}</a>
54 <table class="form-layout-compressed">
56 <td class="font-size12pt label"><strong>{ts}Participant{/ts}</strong></td><td class="font-size12pt"><strong>{$displayName}</strong></td>
58 {if $contributionMode}
59 <tr class="crm-payment-form-block-payment_processor_id"><td class="label nowrap">{$form.payment_processor_id.label}<span class="marker"> * </span></td><td>{$form.payment_processor_id.html}</td></tr>
62 <td class='label'>{ts}Event{/ts}</td><td>{$eventName}</td>
64 <tr class="crm-payment-form-block-contribution_type_id crm-payment-form-block-financial_type_id">
65 <td class="label">{$form.financial_type_id.label}</td><td{$valueStyle}>{$form.financial_type_id.html}
68 <tr class="crm-payment-form-block-total_amount">
69 <td class="label">{$form.total_amount.label}</td>
71 <span id='totalAmount'>{$form.currency.html|crmAddClass:eight} {$form.total_amount.html|crmAddClass:eight}</span> {$paymentAmt}
75 <div class="crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-processed" id="paymentDetails_Information">
76 <div class="crm-accordion-header">
77 {ts}Payment Details{/ts}
79 <div class="crm-accordion-body">
80 <table class="form-layout-compressed" >
81 <tr class="crm-payment-form-block-trxn_date">
82 <td class="label">{$form.trxn_date.label}</td>
83 <td {$valueStyle}>{include file="CRM/common/jcalendar.tpl" elementName=trxn_date}<br />
84 <span class="description">{ts}The date this payment was received.{/ts}</span>
87 <tr class="crm-payment-form-block-payment_instrument_id">
88 <td class="label">{$form.payment_instrument_id.label}</td>
89 <td {$valueStyle}>{$form.payment_instrument_id.html} {help id="payment_instrument_id"}</td>
92 {if $showCheckNumber || !$isOnline}
93 <tr id="checkNumber" class="crm-payment-form-block-check_number">
94 <td class="label">{$form.check_number.label}</td>
95 <td>{$form.check_number.html|crmReplace:class:six}</td>
98 <tr class="crm-payment-form-block-trxn_id">
99 <td class="label">{$form.trxn_id.label}</td>
100 <td {$valueStyle}>{$form.trxn_id.html|crmReplace:class:twelve} {help id="id-trans_id"}</td>
102 {if $email and $outBound_option != 2}
103 <tr class="crm-payment-form-block-is_email_receipt">
105 {$form.is_email_receipt.label}</td><td>{$form.is_email_receipt.html}
106 <span class="description">{ts 1=$email}Automatically email a receipt for this payment to %1?{/ts}</span>
109 {elseif $context eq 'standalone' and $outBound_option != 2 }
110 <tr id="email-receipt" style="display:none;" class="crm-payment-form-block-is_email_receipt">
111 <td class="label">{$form.is_email_receipt.label}</td>
112 <td>{$form.is_email_receipt.html} <span class="description">{ts}Automatically email a receipt for this payment to {/ts}<span id="email-address"></span>?</span>
116 <tr id="fromEmail" class="crm-payment-form-block-receipt_date" style="display:none;">
117 <td class="label">{$form.from_email_address.label}</td>
118 <td>{$form.from_email_address.html}</td>
120 <tr class="crm-payment-form-block-fee_amount"><td class="label">{$form.fee_amount.label}</td><td{$valueStyle}>{$form.fee_amount.html|crmMoney:$currency:'XXX':'YYY'}<br />
121 <span class="description">{ts}Processing fee for this transaction (if applicable).{/ts}</span></td></tr>
122 <tr class="crm-payment-form-block-net_amount"><td class="label">{$form.net_amount.label}</td><td{$valueStyle}>{$form.net_amount.html|crmMoney:$currency:'':1}<br />
123 <span class="description">{ts}Net value of the payment (Total Amount minus Fee).{/ts}</span></td></tr>
128 <div class="accordion ui-accordion ui-widget ui-helper-reset">
129 {* Additional Detail / Honoree Information / Premium Information *}
130 {foreach from=$allPanes key=paneName item=paneValue}
132 <div class="crm-accordion-wrapper crm-ajax-accordion crm-{$paneValue.id}-accordion {if $paneValue.open neq 'true'}collapsed{/if}">
133 <div class="crm-accordion-header" id="{$paneValue.id}">
136 </div><!-- /.crm-accordion-header -->
137 <div class="crm-accordion-body">
139 <div class="{$paneValue.id}"></div>
140 </div><!-- /.crm-accordion-body -->
141 </div><!-- /.crm-accordion-wrapper -->
149 <script type="text/javascript">
151 var url = "{/literal}{$dataUrl}{literal}";
154 showHideByValue( 'is_email_receipt', '', 'fromEmail', 'table-row', 'radio', false );
160 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
164 <script type="text/javascript">
166 if (cj('#is_email_receipt').attr( 'checked' )) {
167 var ok = confirm( '{/literal}{ts escape='js'}Click OK to save this payment record AND send a receipt to the contributor now{/ts}{literal}.' );
177 <script type="text/javascript">
179 checkEmailDependancies( );
180 cj('#is_email_receipt').click( function( ) {
181 checkEmailDependancies( );
185 function checkEmailDependancies( ) {
186 if (cj('#is_email_receipt').attr( 'checked' )) {
187 cj('#fromEmail').show( );
188 cj('#receiptDate').hide( );
191 cj('#fromEmail').hide( );
192 cj('#receiptDate').show( );
196 // bind first click of accordion header to load crm-accordion-body with snippet
197 // everything else taken care of by cj().crm-accordions()
199 cj('#adjust-option-type').hide();
200 cj('.crm-ajax-accordion .crm-accordion-header').one('click', function() {
201 loadPanes(cj(this).attr('id'));
203 cj('.crm-ajax-accordion:not(.collapsed) .crm-accordion-header').each(function(index) {
204 loadPanes(cj(this).attr('id'));
207 // load panes function call for snippet based on id of crm-accordion-header
208 function loadPanes( id ) {
209 var url = "{/literal}{crmURL p='civicrm/payment/add' q='snippet=4&formType=' h=0}{literal}" + id;
211 {if $contributionMode}
212 url = url + "&mode={$contributionMode}";
215 url = url + "&qfKey={$qfKey}";
218 if (! cj('div.'+id).html()) {
219 var loading = '<img src="{/literal}{$config->resourceBase}i/loading.gif{literal}" alt="{/literal}{ts escape='js'}loading{/ts}{literal}" /> {/literal}{ts escape='js'}Loading{/ts}{literal}...';
220 cj('div.'+id).html(loading);
223 success: function(data) { cj('div.'+id).html(data); }
228 cj('#fee_amount').change( function() {
229 var totalAmount = cj('#total_amount').val();
230 var feeAmount = cj('#fee_amount').val();
231 var netAmount = totalAmount.replace(/,/g, '') - feeAmount.replace(/,/g, '');
232 if (!cj('#net_amount').val()) {
233 cj('#net_amount').val(netAmount);
238 {if !$contributionMode}
239 {include file="CRM/common/showHideByFieldValue.tpl"
240 trigger_field_id ="payment_instrument_id"
242 target_element_id ="checkNumber"
243 target_element_type ="table-row"
249 {* include jscript to warn if unsaved form field changes *}
250 {include file="CRM/common/formNavigate.tpl"}
254 <script type="text/javascript">
256 cj().crmAccordions();