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 {if $paymentType eq 'refund'}
31 <h3>{ts}New Event Refund{/ts}</h3>
33 <h3>{if $component eq 'event'}{if $contributionMode}{ts}Credit Card Event Payment{/ts}{else}{ts}New Event Payment{/ts}{/if}{/if}</h3>
35 <div class="crm-block crm-form-block crm-payment-form-block">
37 {if $contributionMode == 'test'}
38 {assign var=contribMode value="TEST"}
39 {elseif $contributionMode == 'live'}
40 {assign var=contribMode value="LIVE"}
44 <div class="messages status no-popup">
45 <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}
48 <div class="crm-submit-buttons">
49 {include file="CRM/common/formButtons.tpl"}
50 {if $newCredit AND $contributionMode EQ null}
52 {capture assign=ccModeLink}{crmURL p='civicrm/payment/add' q="reset=1&action=add&cid=`$contactId`&id=`$id`&component=`$component`&mode=live"}{/capture}
54 {if $paymentType eq 'owed'}
55 <span class="action-link crm-link-credit-card-mode"> <a href="{$ccModeLink}">» {ts}submit credit card payment{/ts}</a>
59 <table class="form-layout-compressed">
61 <td class="font-size12pt label"><strong>{ts}Participant{/ts}</strong></td><td class="font-size12pt"><strong>{$displayName}</strong></td>
63 {if $contributionMode}
64 <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>
67 <td class='label'>{ts}Event{/ts}</td><td>{$eventName}</td>
69 <tr class="crm-payment-form-block-contribution_type_id crm-payment-form-block-financial_type_id">
70 <td class="label">{$form.financial_type_id.label}</td><td{$valueStyle}>{$form.financial_type_id.html}
73 <tr class="crm-payment-form-block-total_amount">
74 <td class="label">{$form.total_amount.label}</td>
76 <span id='totalAmount'>{$form.currency.html|crmAddClass:eight} {$form.total_amount.html|crmAddClass:eight}</span> <span class="status">{if $paymentType EQ 'refund'}{ts}Refund Due{/ts}{else}{ts}Balance Owed{/ts}{/if}: {$paymentAmt|crmMoney}</span>
80 <div class="crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-processed" id="paymentDetails_Information">
81 <div class="crm-accordion-header">
82 {if $paymentType EQ 'refund'}{ts}Refund Details{/ts}{else}{ts}Payment Details{/ts}{/if}
84 <div class="crm-accordion-body">
85 <table class="form-layout-compressed" >
86 <tr class="crm-payment-form-block-trxn_date">
87 <td class="label">{$form.trxn_date.label}</td>
88 <td {$valueStyle}>{include file="CRM/common/jcalendar.tpl" elementName=trxn_date}<br />
89 <span class="description">{ts}The date this payment was received.{/ts}</span>
92 <tr class="crm-payment-form-block-payment_instrument_id">
93 <td class="label">{$form.payment_instrument_id.label}</td>
94 <td {$valueStyle}>{$form.payment_instrument_id.html} {help id="payment_instrument_id"}</td>
97 {if $showCheckNumber || !$isOnline}
98 <tr id="checkNumber" class="crm-payment-form-block-check_number">
99 <td class="label">{$form.check_number.label}</td>
100 <td>{$form.check_number.html|crmReplace:class:six}</td>
103 <tr class="crm-payment-form-block-trxn_id">
104 <td class="label">{$form.trxn_id.label}</td>
105 <td {$valueStyle}>{$form.trxn_id.html|crmReplace:class:twelve} {help id="id-trans_id"}</td>
107 {if $email and $outBound_option != 2}
108 <tr class="crm-payment-form-block-is_email_receipt">
110 {$form.is_email_receipt.label}</td><td>{$form.is_email_receipt.html}
111 <span class="description">{ts 1=$email}Automatically email a receipt to %1?{/ts}</span>
115 <tr id="fromEmail" class="crm-payment-form-block-receipt_date" style="display:none;">
116 <td class="label">{$form.from_email_address.label}</td>
117 <td>{$form.from_email_address.html}</td>
119 <tr id='notice' class="crm-event-eventfees-form-block-receipt_text">
120 <td class="label">{$form.receipt_text.label}</td>
121 <td><span class="description">
122 {ts}Enter a message you want included at the beginning of the confirmation email.{/ts}
124 {$form.receipt_text.html|crmAddClass:huge}
127 <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 />
128 <span class="description">{ts}Processing fee for this transaction (if applicable).{/ts}</span></td></tr>
129 <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 />
130 <span class="description">{ts}Net value of the payment (Total Amount minus Fee).{/ts}</span></td></tr>
135 <div class="accordion ui-accordion ui-widget ui-helper-reset">
136 {* Additional Detail / Honoree Information / Premium Information *}
137 {foreach from=$allPanes key=paneName item=paneValue}
139 <div class="crm-accordion-wrapper crm-ajax-accordion crm-{$paneValue.id}-accordion {if $paneValue.open neq 'true'}collapsed{/if}">
140 <div class="crm-accordion-header" id="{$paneValue.id}">
143 </div><!-- /.crm-accordion-header -->
144 <div class="crm-accordion-body">
146 <div class="{$paneValue.id}"></div>
147 </div><!-- /.crm-accordion-body -->
148 </div><!-- /.crm-accordion-wrapper -->
156 <script type="text/javascript">
158 var url = "{/literal}{$dataUrl}{literal}";
161 showHideByValue( 'is_email_receipt', '', 'notice', 'table-row', 'radio', false );
162 showHideByValue( 'is_email_receipt', '', 'fromEmail', 'table-row', 'radio', false );
168 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
171 <script type="text/javascript">
173 if (cj('#is_email_receipt').attr( 'checked' )) {
174 var ok = confirm( '{/literal}{ts escape='js'}Click OK to save this payment record AND send a receipt to the contributor now{/ts}{literal}.' );
184 <script type="text/javascript">
186 checkEmailDependancies( );
187 cj('#is_email_receipt').click( function( ) {
188 checkEmailDependancies( );
192 function checkEmailDependancies( ) {
193 if (cj('#is_email_receipt').attr( 'checked' )) {
194 cj('#fromEmail').show( );
195 cj('#receiptDate').hide( );
196 cj('#notice').show( );
199 cj('#fromEmail').hide( );
200 cj('#notice').hide( );
201 cj('#receiptDate').show( );
205 // bind first click of accordion header to load crm-accordion-body with snippet
206 // everything else taken care of by cj().crm-accordions()
208 cj('#adjust-option-type').hide();
209 cj('.crm-ajax-accordion .crm-accordion-header').one('click', function() {
210 loadPanes(cj(this).attr('id'));
212 cj('.crm-ajax-accordion:not(.collapsed) .crm-accordion-header').each(function(index) {
213 loadPanes(cj(this).attr('id'));
216 // load panes function call for snippet based on id of crm-accordion-header
217 function loadPanes( id ) {
218 var url = "{/literal}{crmURL p='civicrm/payment/add' q='snippet=4&formType=' h=0}{literal}" + id;
220 {if $contributionMode}
221 url = url + "&mode={$contributionMode}";
224 url = url + "&qfKey={$qfKey}";
227 if (! cj('div.'+id).html()) {
228 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}...';
229 cj('div.'+id).html(loading);
232 success: function(data) { cj('div.'+id).html(data); }
237 cj('#fee_amount').change( function() {
238 var totalAmount = cj('#total_amount').val();
239 var feeAmount = cj('#fee_amount').val();
240 var netAmount = totalAmount.replace(/,/g, '') - feeAmount.replace(/,/g, '');
241 if (!cj('#net_amount').val()) {
242 cj('#net_amount').val(netAmount);
247 {if !$contributionMode}
248 {include file="CRM/common/showHideByFieldValue.tpl"
249 trigger_field_id ="payment_instrument_id"
251 target_element_id ="checkNumber"
252 target_element_type ="table-row"
258 {* include jscript to warn if unsaved form field changes *}
259 {include file="CRM/common/formNavigate.tpl"}
263 <script type="text/javascript">
265 cj().crmAccordions();