From 0d7d6391ebd1f5e19c929e8818dbde4f29179f94 Mon Sep 17 00:00:00 2001 From: pratikshad Date: Fri, 10 Apr 2015 19:40:37 +0530 Subject: [PATCH] CRM-16222-PR improvement --- CRM/Price/BAO/PriceField.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 5872a361e6..5de3853f22 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -320,22 +320,17 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { )); $extra = array(); - if (!empty($qf->_quickConfig) && !empty($qf->_contributionAmount)) { - foreach ($fieldOptions as &$fieldOption) { - if (strtolower($fieldOption['name']) == 'other_amount') { - $fieldOption['label'] = $fieldOption['label'] . ' ' . $currencySymbol; - } - } - $qf->assign('priceset', $elementName); - $extra = array('onclick' => 'useAmountOther();'); - } - if (!empty($qf->_membershipBlock) && !empty($qf->_quickConfig) && $field->name == 'other_amount' && empty($qf->_contributionAmount)) { $useRequired = 0; } elseif (!empty($fieldOptions[$optionKey]['label'])) { //check for label. $label = $fieldOptions[$optionKey]['label']; + if (!empty($qf->_quickConfig) && !empty($qf->_contributionAmount) && strtolower($fieldOptions[$optionKey]['name']) == 'other_amount') { + $label .= ' ' . $currencySymbol; + $qf->assign('priceset', $elementName); + $extra = array('onclick' => 'useAmountOther();'); + } } $element = &$qf->add('text', $elementName, $label, -- 2.25.1