Overview: Fix display of new setting in admin form.
Before: Field incorrectly displays as multi-value selection.
After: Field displays as single-value selection. The null value is specifically allowed.
*
* @return array
*/
- public static function getLocaleOptions(): array {
+ public static function getFormatLocales(): array {
$values = CRM_Core_OptionValue::getValues(['name' => 'languages'], $optionValues, 'label', TRUE);
$return = [];
+ $return[NULL] = ts('Inherit from language');
foreach ($values as $value) {
$return[$value['name']] = $value['label'];
}
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => [
- 'multiple' => 0,
'class' => 'crm-select2',
],
'default' => NULL,
'is_contact' => 0,
'help_text' => NULL,
'pseudoconstant' => [
- 'callback' => 'CRM_Core_I18n::getLocaleOptions',
+ 'callback' => 'CRM_Core_I18n::getFormatLocales',
],
'description' => ts('Locale to use when formatting money (and in future dates). This replaces thousandsSeparator & decimalSeparator & moneyFormat settings.'),
],