diff --git a/code/model/editableformfields/EditableFormField.php b/code/model/editableformfields/EditableFormField.php index c4f4078..1e164b5 100755 --- a/code/model/editableformfields/EditableFormField.php +++ b/code/model/editableformfields/EditableFormField.php @@ -167,22 +167,23 @@ class EditableFormField extends DataObject _t( 'EditableFormField.MERGEFIELDNAME', '
' . - '' . + '' . '
' . '$' . $this->Name . '' . '
' . '
' ) ), - TextField::create('Title'), + TextField::create('Title', _t('EditableFormField.TITLE', 'Title')), TextField::create('Default', _t('EditableFormField.DEFAULT', 'Default value')), TextField::create('RightTitle', _t('EditableFormField.RIGHTTITLE', 'Right title')), - SegmentField::create('Name')->setModifiers(array( + SegmentField::create('Name', _t('EditableFormField.NAME', 'Name'))->setModifiers(array( UnderscoreSegmentFieldModifier::create()->setDefault('FieldName'), DisambiguationSegmentFieldModifier::create(), ))->setPreview($this->Name) ) ); + $fields->fieldByName('Root.Main')->setTitle(_t('SiteTree.TABMAIN', 'Main')); // Custom settings if (!empty(self::$allowed_css)) { @@ -221,6 +222,7 @@ class EditableFormField extends DataObject $validationFields = $this->getFieldValidationOptions(); if ($validationFields && $validationFields->count()) { $fields->addFieldsToTab('Root.Validation', $validationFields); + $fields->fieldByName('Root.Validation')->setTitle(_t('EditableFormField.VALIDATION', 'Validation')); } // Add display rule fields @@ -294,11 +296,15 @@ class EditableFormField extends DataObject ); return new FieldList( - CheckboxField::create('ShowOnLoad') - ->setDescription(_t( + CheckboxField::create( + 'ShowOnLoad', + _t('EditableFormField.SHOWONLOAD_TITLE', 'Show on load') + )->setDescription( + _t( 'EditableFormField.SHOWONLOAD', 'Initial visibility before processing these rules' - )), + ) + ), GridField::create( 'DisplayRules', _t('EditableFormField.CUSTOMRULES', 'Custom Rules'), diff --git a/lang/en.yml b/lang/en.yml index baba2a6..f5c2781 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -78,8 +78,10 @@ en: LESSTHANEQUAL: 'Value Less Than Or Equal' LOCKED: 'These fields cannot be modified' MAXVALUE: 'Max Value' + MERGEFIELDNAME: 'Merge field' MINVALUE: 'Min Value' 'NO': 'No' + NAME: 'Name' NOTBLANK: 'Not Blank' NOTVALUE: 'Not Value' OPTIONS: Options @@ -89,6 +91,7 @@ en: RIGHTTITLE: 'Right title' SHOW: Show SHOWONLOAD: 'Initial visibility before processing these rules' + SHOWONLOAD_TITLE: 'Show on load' SHOWOPTIONS: 'Show Options' SHOWTHISFIELD: 'Show This Field' SINGULARNAME: 'Editable Form Field'