From c23c87f6288dd6ddd56601eeebcb4da87f11dfe1 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Tue, 11 Aug 2015 17:46:37 +1200 Subject: [PATCH] CRM-17010 add data info to price-set-class --- CRM/Price/BAO/PriceField.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index b365b93cbf..e65ed5432f 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -401,6 +401,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { 'price' => json_encode(array($elementName, $priceVal)), 'data-amount' => $opt[$valueFieldName], 'data-currency' => $currencyName, + 'data-price-field-values' => json_encode($customOption), ); if (!empty($qf->_quickConfig) && $field->name == 'contribution_amount') { $extra += array('onclick' => 'clearAmountOther();'); @@ -506,7 +507,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { '' => ts('- select -'), ) + $selectOption, $useRequired && $field->is_required, - array('price' => json_encode($priceVal), 'class' => 'crm-select2') + array('price' => json_encode($priceVal), 'class' => 'crm-select2', 'data-price-field-values' => json_encode($customOption)) ); // CRM-6902 - Add "max" option for a price set field -- 2.25.1