// Set title
if ($this->_mode && $this->_id) {
- $this->setPageTitle(ts('Contribution (Pay Now)'));
$this->_payNow = TRUE;
$this->assign('payNow', $this->_payNow);
+ CRM_Utils_System::setTitle(ts('Pay with Credit Card'));
}
elseif ($this->_mode) {
$this->setPageTitle($this->_ppID ? ts('Credit Card Pledge Payment') : ts('Credit Card Contribution'));
$defaults['hidden_AdditionalDetail'] = 1;
}
- $paneNames = array(
- ts('Additional Details') => 'AdditionalDetail',
- );
+ $paneNames = array();
+ if (empty($this->_payNow)) {
+ $paneNames[ts('Additional Details')] = 'AdditionalDetail';
+ }
//Add Premium pane only if Premium is exists.
$dao = new CRM_Contribute_DAO_Product();
$dao->is_active = 1;
- if ($dao->find(TRUE)) {
+ if ($dao->find(TRUE) && empty($this->_payNow)) {
$paneNames[ts('Premium Information')] = 'Premium';
}
);
$currencyFreeze = FALSE;
- if ($this->_mode && $this->_id && ($this->_action & CRM_Core_Action::UPDATE)) {
+ if (!empty($this->_payNow) && ($this->_action & CRM_Core_Action::UPDATE)) {
$statusElement->freeze();
$currencyFreeze = TRUE;
$attributes['total_amount']['readonly'] = TRUE;
// CRM-7362 --add campaigns.
CRM_Campaign_BAO_Campaign::addCampaign($this, CRM_Utils_Array::value('campaign_id', $this->_values));
- CRM_Contribute_Form_SoftCredit::buildQuickForm($this);
+ if (empty($this->_payNow)) {
+ CRM_Contribute_Form_SoftCredit::buildQuickForm($this);
+ }
$js = NULL;
if (!$this->_mode) {
if ($result->is_pay_later && CRM_Utils_Array::value('contribution_status_name', $row) == 'Pending') {
$row['contribution_status'] .= ' (' . ts('Pay Later') . ')';
+ $links[CRM_Core_Action::ADD] = array(
+ 'name' => ts('Pay with Credit Card'),
+ 'url' => 'civicrm/contact/view/contribution',
+ 'qs' => 'reset=1&action=update&id=%%id%%&cid=%%cid%%&context=%%cxt%%&mode=live',
+ 'title' => ts('Pay with Credit Card'),
+ );
}
elseif (CRM_Utils_Array::value('contribution_status_name', $row) == 'Pending') {
$row['contribution_status'] .= ' (' . ts('Incomplete Transaction') . ')';
{ts}(test){/ts}
{/if} {help id="id-financial_type"}
</td>
- <td>
- {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}
- <a class="open-inline-noreturn action-item crm-hover-button" href="{$payNowLink}">» {ts}Pay Now{/ts}</a>
- {/if}
- </td>
</tr>
{if $action eq 2 and $lineItem and !$defaultContribution}
<tr>
<td>{$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}
</td>
+ <td>
+ {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}
+ <a class="open-inline-noreturn action-item crm-hover-button" href="{$payNowLink}">» {ts}Pay with Credit Card{/ts}</a>
+ {/if}
+ </td>
</tr>
{/if}
{include file='CRM/Core/BillingBlockWrapper.tpl'}
<!-- start of soft credit -->
- <div class="crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-processed {if $noSoftCredit}collapsed{/if}" id="softCredit">
- <div class="crm-accordion-header">
- {ts}Soft Credit{/ts} {help id="id-soft_credit"}
- </div>
- <div class="crm-accordion-body">
- <table class="form-layout-compressed">
- <tr class="crm-contribution-form-block-soft_credit_to">
- <td colspan="2">
- {include file="CRM/Contribute/Form/SoftCredit.tpl"}
- </td>
- </tr>
- </table>
+ {if !$payNow}
+ <div class="crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-processed {if $noSoftCredit}collapsed{/if}" id="softCredit">
+ <div class="crm-accordion-header">
+ {ts}Soft Credit{/ts} {help id="id-soft_credit"}
+ </div>
+ <div class="crm-accordion-body">
+ <table class="form-layout-compressed">
+ <tr class="crm-contribution-form-block-soft_credit_to">
+ <td colspan="2">
+ {include file="CRM/Contribute/Form/SoftCredit.tpl"}
+ </td>
+ </tr>
+ </table>
+ </div>
</div>
- </div>
+ {/if}
<!-- end of soft credit -->
<!-- start of PCP -->
- {if $siteHasPCPs}
+ {if $siteHasPCPs && !$payNow}
<div class="crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-processed {if $noPCP}collapsed{/if}" id="softCredit">
<div class="crm-accordion-header">
{ts}Personal Campaign Page{/ts} {help id="id-pcp"}
</div>
{/if}
- <div id="customData" class="crm-contribution-form-block-customData"></div>
+ {if !$payNow}
+ <div id="customData" class="crm-contribution-form-block-customData"></div>
+ {/if}
{*include custom data js file*}
{include file="CRM/common/customData.tpl"}