Skip to content
Snippets Groups Projects

Issue #3436591 by arnested, adityarawat_ln, webmestre: Add description of currency setting

Merged Issue #3436591 by arnested, adityarawat_ln, webmestre: Add description of currency setting
Merged Arne Jørgensen requested to merge issue/number_formatter-3436591:2.0.x into 2.0.x
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
@@ -200,8 +200,12 @@ class NumberFormatter extends FormatterBase implements ContainerFactoryPluginInt
@@ -200,8 +200,12 @@ class NumberFormatter extends FormatterBase implements ContainerFactoryPluginInt
if ($this->isCurrencyStyle($style)) {
if ($this->isCurrencyStyle($style)) {
$element['currency']['#type'] = 'textfield';
$element['currency']['#type'] = 'textfield';
$element['currency']['#size'] = 8;
$element['currency']['#size'] = 8;
 
$element['currency']['#maxlength'] = 3;
$element['currency']['#title'] = $this->t('Currency');
$element['currency']['#title'] = $this->t('Currency');
$element['currency']['#default_value'] = $this->getSetting('currency');
$element['currency']['#default_value'] = $this->getSetting('currency');
 
$element['currency']['#description'] = $this->t('The 3-letter <a href=":url" target="_blank">ISO 4217 currency code</a> indicating the currency to use.', [
 
':url' => 'https://en.wikipedia.org/wiki/ISO_4217',
 
]);
}
}
else {
else {
// Force the element to render (so that the AJAX wrapper is rendered) even
// Force the element to render (so that the AJAX wrapper is rendered) even
Loading