From 52912b1f9ea6858234164decc293efbb5ba45f58 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 24 May 2015 23:19:30 +1200 Subject: [PATCH] CRM-16555 remove accordian from billing section & hence a bunch of code None of the other backoffice forms put this in an accordian & it is not optional if shown - because it is processor loaded so putting in an accordian here seems odd. If it is to be in an accordian we should do in billingblock & apply to membership & event forms --- CRM/Contribute/Form/Contribution.php | 19 ------------------- CRM/Core/Payment/Form.php | 1 - .../CRM/Contribute/Form/Contribution.tpl | 17 +---------------- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 487ee06759..e6fea0842e 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -161,17 +161,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP protected $_cdType; public $_honoreeProfileType; - /** - * Array of billing panes to be displayed by billingBlock.tpl. - * Currently this is likely to look like - * array('Credit Card' => ts('Credit Card') or - * array('Direct Debit => ts('Direct Debit') - * @todo billing details (address stuff) to be added when we stop hard coding the panes in billingBlock.tpl - * - * @var array - */ - public $billingPane = array(); - /** * Array of the payment fields to be displayed in the payment fieldset (pane) in billingBlock.tpl * this contains all the information to describe these fields from quickform. See CRM_Core_Form_Payment getPaymentFormFieldsMetadata @@ -580,15 +569,8 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $paneNames[ts('Premium Information')] = 'Premium'; } - $billingPanes = array(); if ($this->_mode) { if (CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE) == TRUE) { - foreach ($this->billingPane as $name => $label) { - if (!empty($this->billingFieldSets[$name]['fields'])) { - // @todo reduce variation so we don't have to convert 'credit_card' to 'CreditCard' - $billingPanes[$label] = $this->generatePane(CRM_Utils_String::convertStringToCamel($name), $defaults); - } - } if (!empty($this->_recurPaymentProcessors)) { CRM_Contribute_Form_Contribution_Main::buildRecur($this); $this->setDefaults(array('is_recur' => 0)); @@ -604,7 +586,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $qfKey = $this->controller->_key; $this->assign('qfKey', $qfKey); - $this->assign('billingPanes', $billingPanes); $this->assign('allPanes', $allPanes); $this->addFormRule(array('CRM_Contribute_Form_Contribution', 'formRule'), $this); diff --git a/CRM/Core/Payment/Form.php b/CRM/Core/Payment/Form.php index 865fa196db..7569320a9d 100644 --- a/CRM/Core/Payment/Form.php +++ b/CRM/Core/Payment/Form.php @@ -62,7 +62,6 @@ class CRM_Core_Payment_Form { $form->assign('paymentTypeLabel', $paymentTypeLabel); $form->billingFieldSets[$paymentTypeName]['fields'] = $form->_paymentFields = array_intersect_key(self::getPaymentFieldMetadata($processor), array_flip($paymentFields)); - $form->billingPane = array($paymentTypeName => $paymentTypeLabel); $form->assign('paymentFields', $paymentFields); } diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index 5729787547..1143d50412 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -214,22 +214,7 @@ -
-
- {* Billing Pane is the only billing pane currently *} - {foreach from=$billingPanes key=paneName item=paneValue} -
-
- {$paneName} -
-
-
-
-
- {/foreach} -
-
- {include file="CRM/common/paymentBlock.tpl"} + {include file='CRM/Core/BillingBlockWrapper.tpl'}
-- 2.25.1