X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=templates%2FCRM%2FContribute%2FForm%2FContribution.tpl;h=1dacf49824e5798f9556fdff22ebb4583b1fea0c;hb=53fff622a37bb4bccccdc839e0843dab36579125;hp=7a7ac144574ca99e284593596bfd75fd233017a9;hpb=428e365187b7b2025d6ece0481436ae22e5755f8;p=civicrm-core.git
diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl
index 7a7ac14457..1dacf49824 100644
--- a/templates/CRM/Contribute/Form/Contribution.tpl
+++ b/templates/CRM/Contribute/Form/Contribution.tpl
@@ -40,9 +40,12 @@
{/if}
{if $contributionMode}
- {if $contactId}
+ {if $contactId && $payNow}
+ {ts 1=$displayName 2=$contributionMode|upper}Use this form to edit a contribution on behalf of %1.
A
+ %2 transaction will be submitted using the selected payment processor.{/ts}
+ {elseif $contactId}
{ts 1=$displayName 2=$contributionMode|upper}Use this form to submit a new contribution on behalf of %1.
A
- %2 transaction will be submitted using the selected payment processor.{/ts}
+ %2 transaction will be submitted using the selected payment processor.{/ts}
{else}
{ts 1=$displayName 2=$contributionMode|upper}Use this form to submit a new contribution.
A %2 transaction will be submitted using the selected payment processor.{/ts}
{/if}
@@ -97,21 +100,23 @@
{$form.total_amount.label} |
{$form.currency.html|crmAddClass:eight} {$form.total_amount.html|crmAddClass:eight}
- {if $hasPriceSets}
- {ts}OR{/ts}
- {$form.price_set_id.html}
-
- {/if}
+ {if !$payNow}
+ {if $hasPriceSets}
+ {ts}OR{/ts}
+ {$form.price_set_id.html}
+
+ {/if}
- {if $ppID}{ts}adjust payment amount{/ts}{help id="adjust-payment-amount"}{/if}
-
- {if $hasPriceSets} {ts}Alternatively, you can use a price set.{/ts}{/if}
-
-
+ {if $ppID}{ts}adjust payment amount{/ts}{help id="adjust-payment-amount"}{/if}
+
+ {if $hasPriceSets} {ts}Alternatively, you can use a price set.{/ts}{/if}
+
+
+ {/if}
|
- {if $buildRecurBlock}
+ {if $buildRecurBlock && !$payNow}
|
@@ -173,14 +178,22 @@
|
{/if}
- {if !$contributionMode}
+ {if !$contributionMode || $payNow}
{$form.contribution_status_id.label} |
{$form.contribution_status_id.html}
{if $contribution_status_id eq 2}{if $is_pay_later }: {ts}Pay Later{/ts} {else}: {ts}Incomplete Transaction{/ts}{/if}{/if}
|
+
+ {if $contactId && $contribID && $contributionMode EQ null && $contribution_status_id eq 2}
+ {capture assign=payNowLink}{crmURL p='civicrm/contact/view/contribution' q="reset=1&action=update&id=`$contribID`&cid=`$contactId`&context=`$context`&mode=live"}{/capture}
+ » {ts}Pay with Credit Card{/ts}
+ {/if}
+ |
+ {/if}
+ {if !$contributionMode}
{* Cancellation / Refunded fields are hidden unless contribution status is set to Cancelled or Refunded*}
|
@@ -213,7 +226,7 @@
{/if}
- {if $form.revenue_recognition_date}
+ {if $form.revenue_recognition_date && !$payNow}
{$form.revenue_recognition_date.label} |
{$form.revenue_recognition_date.html} |
@@ -224,24 +237,26 @@
{include file='CRM/Core/BillingBlockWrapper.tpl'}
-
-
-
+ {/if}
- {if $siteHasPCPs}
+ {if $siteHasPCPs && !$payNow}
{/if}
-
+ {if !$payNow}
+
+ {/if}
{*include custom data js file*}
{include file="CRM/common/customData.tpl"}
@@ -456,12 +473,6 @@
}
}
}
-
- function status() {
- cj("#cancel_date").val('');
- cj("#cancel_reason").val('');
- }
-
{/literal}
@@ -488,26 +499,26 @@
{/literal}{if !$contributionMode}{literal}
CRM.$(function($) {
- showHideCancelInfo(cj('#contribution_status_id'));
+ showHideCancelInfo($('#contribution_status_id'));
+
+ $('#contribution_status_id').change(function() {
+ showHideCancelInfo($('#contribution_status_id'));
+ });
- cj('#contribution_status_id').change(function() {
- showHideCancelInfo(cj('#contribution_status_id'));
+ function showHideCancelInfo(obj) {
+ var cancelInfo_show_ids = [{/literal}{$cancelInfo_show_ids}{literal}];
+ if (cancelInfo_show_ids.indexOf(obj.val()) > -1) {
+ $('#cancelInfo').show( );
+ $('#total_amount').attr('readonly', true);
+ }
+ else {
+ $("#cancel_date").val('');
+ $("#cancel_reason").val('');
+ $('#cancelInfo').hide( );
+ $("#total_amount").removeAttr('readonly');
+ }
}
- );
- });
-
- function showHideCancelInfo(obj) {
- var cancelInfo_show_ids = [{/literal}{$cancelInfo_show_ids}{literal}];
- if (cancelInfo_show_ids.indexOf(obj.val()) > -1) {
- cj('#cancelInfo').show( );
- cj('#total_amount').attr('readonly', true);
- }
- else {
- status();
- cj('#cancelInfo').hide( );
- cj("#total_amount").removeAttr('readonly');
- }
- }
+ });
{/literal}{/if}{literal}