X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=templates%2FCRM%2FContribute%2FForm%2FContribution.tpl;h=1dacf49824e5798f9556fdff22ebb4583b1fea0c;hb=53fff622a37bb4bccccdc839e0843dab36579125;hp=e72413b9fc58c062d402e44cf47a5aaf9ebf7d6c;hpb=17d83f507063c3262bfb68ee37f23af0de1cc233;p=civicrm-core.git
diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl
index e72413b9fc..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}
- {ts 1=$displayName 2=$contributionMode|upper}Use this form to {if $payNow} edit {else} submit a new {/if} contribution on behalf of %1.
A
- %2 transaction will be submitted using the selected payment processor.{/ts}
+ {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}
{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}
@@ -86,12 +89,6 @@
{ts}(test){/ts}
{/if} {help id="id-financial_type"}
-
- {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 Now{/ts}
- {/if}
- |
{if $action eq 2 and $lineItem and !$defaultContribution}
@@ -187,6 +184,12 @@
{$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}
@@ -234,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"}
@@ -466,12 +473,6 @@
}
}
}
-
- function status() {
- cj("#cancel_date").val('');
- cj("#cancel_reason").val('');
- }
-
{/literal}
@@ -498,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}