$this->assign('isShare', CRM_Utils_Array::value('is_share', $this->_values));
$this->assign('isConfirmEnabled', CRM_Utils_Array::value('is_confirm_enabled', $this->_values));
+ // Required for currency formatting in the JS layer
+ // this is a temporary fix intended to resolve a regression quickly
+ // And assigning moneyFormat for js layer formatting
+ // will only work until that is done.
+ // https://github.com/civicrm/civicrm-core/pull/19151
+ $this->assign('moneyFormat', CRM_Utils_Money::format(1234.56));
+
$this->assign('reset', CRM_Utils_Request::retrieve('reset', 'Boolean'));
$this->assign('mainDisplay', CRM_Utils_Request::retrieve('_qf_Main_display', 'Boolean',
CRM_Core_DAO::$_nullObject));
// CRM-18399: used by template to pass pre profile id as a url arg
$this->assign('custom_pre_id', $this->_values['custom_pre_id']);
+ // Required for currency formatting in the JS layer
+
+ // Required for currency formatting in the JS layer
+ // this is a temporary fix intended to resolve a regression quickly
+ // And assigning moneyFormat for js layer formatting
+ // will only work until that is done.
+ // https://github.com/civicrm/civicrm-core/pull/19151
+ $this->assign('moneyFormat', CRM_Utils_Money::format(1234.56));
+
CRM_Core_Payment_ProcessorForm::buildQuickForm($this);
$contactID = $this->getContactID();
var thousandMarker = '{/literal}{$config->monetaryThousandSeparator}{literal}';
var separator = '{/literal}{$config->monetaryDecimalPoint}{literal}';
var symbol = '{/literal}{$currencySymbol}{literal}';
+// moneyFormat is part of a temporary fix. it should
+// not be expected to be present in future versions
+// see https://github.com/civicrm/civicrm-core/pull/19151
+
+var moneyFormat = '{/literal}{$moneyFormat}{literal}';
var optionSep = '|';
// Recalculate the total fees based on user selection
// totalfee is monetary, round it to 2 decimal points so it can
// go as a float - CRM-13491
totalfee = Math.round(totalfee*100)/100;
- var totalFormattedFee = symbol + ' ' + CRM.formatMoney(totalfee, true);
+ // dev/core#1019 Use the moneyFormat assigned to the template as an interim fix
+ // to support forms using a currency other that the site default. Also make sure to
+ // support various currency formatting options,
+ // temporary measure - pending
+ // our preferred fix.
+ // see https://github.com/civicrm/civicrm-core/pull/19151
+ var totalFormattedFee = CRM.formatMoney(totalfee, false, moneyFormat);
cj('#pricevalue').html(totalFormattedFee);
cj('#total_amount').val( totalfee );