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( $fields->addFieldToTab(
'Root.Main', 'Root.Main',
CheckboxField::create('UseEmptyString') CheckboxField::create('UseEmptyString', _t(__CLASS__ . '.USE_EMPTY_STRING', 'Set default empty string'))
->setTitle('Set default empty string')
); );
$fields->addFieldToTab( $fields->addFieldToTab(
'Root.Main', 'Root.Main',
TextField::create('EmptyString') TextField::create('EmptyString', _t(__CLASS__ . '.EMPTY_STRING', 'Empty String'))
->setTitle('Empty String')
); );
return $fields; return $fields;

View File

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