NEW default value for Country Dropdown (add i18n to the new fields)

This commit is contained in:
Chen Shenghan 2018-05-02 13:57:47 +12:00
parent 8870833318
commit b205ca952a
2 changed files with 5 additions and 4 deletions

View File

@ -49,14 +49,12 @@ class EditableCountryDropdownField extends EditableFormField
$fields->addFieldToTab(
'Root.Main',
CheckboxField::create('UseEmptyString')
->setTitle('Set default empty string')
CheckboxField::create('UseEmptyString', _t(__CLASS__ . '.USE_EMPTY_STRING', 'Set default empty string'))
);
$fields->addFieldToTab(
'Root.Main',
TextField::create('EmptyString')
->setTitle('Empty String')
TextField::create('EmptyString', _t(__CLASS__ . '.EMPTY_STRING', 'Empty String'))
);
return $fields;

View File

@ -89,11 +89,14 @@ en:
other: '{count} Checkbox Groups'
SINGULARNAME: 'Checkbox Group'
SilverStripe\UserForms\Model\EditableFormField\EditableCountryDropdownField:
DEFAULT: 'Default value'
EMPTY_STRING: 'Empty String'
PLURALNAME: 'Country Dropdowns'
PLURALS:
one: 'A Country Dropdown'
other: '{count} Country Dropdowns'
SINGULARNAME: 'Country Dropdown'
USE_EMPTY_STRING: 'Set default empty string'
SilverStripe\UserForms\Model\EditableFormField\EditableDateField:
PLURALNAME: 'Date Fields'
PLURALS: