From: pratikshad Date: Fri, 10 Apr 2015 14:10:37 +0000 (+0530) Subject: CRM-16222-PR improvement X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0d7d6391ebd1f5e19c929e8818dbde4f29179f94;p=civicrm-core.git CRM-16222-PR improvement --- 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,