$form->assign('snippet', $form->_snippet);
$paymentProcessors = $form->get('paymentProcessors');
- $form->assign('ppType', FALSE);
$form->_ppType = NULL;
- if (!empty($paymentProcessors)) {
+ if ($paymentProcessors) {
// Fetch type during form post
if (CRM_Utils_Array::value('hidden_processor', $_POST)) {
$form->_ppType = CRM_Utils_Array::value('payment_processor', $_POST);
$form->set('mode', $form->_mode);
$form->set('paymentProcessor', $form->_paymentProcessor);
}
+ // When user presses the back button
+ elseif (!empty($form->_submitValues)) {
+ $form->_ppType = CRM_Utils_Array::value('payment_processor', $form->_submitValues);
+ }
// Fetch type during ajax request
elseif (isset($_GET['type']) && $form->_snippet) {
$form->_ppType = $_GET['type'];
}
}
if ($form->_ppType) {
- $form->assign('ppType', TRUE);
CRM_Core_Payment_ProcessorForm::preProcess($form);
}
}
}
}
+ $form->assign('ppType', $form->_ppType);
}
}
{/if}
</div>
-{* Hide Credit Card Block and Billing information if contribution is pay later. *}
- {if $form.is_pay_later and $hidePaymentInformation}
- {include file="CRM/common/showHideByFieldValue.tpl"
- trigger_field_id ="is_pay_later"
- trigger_value =""
- target_element_id ="billing-payment-block"
- target_element_type ="table-row"
- field_type ="radio"
- invert = 1
- }
- {/if}
-
<script type="text/javascript">
{if $pcp}
pcpAnonymous();