From d66b06dbe4cb517da85de80d3c890f2ab819ee3a Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Wed, 20 Sep 2017 16:31:40 +1200 Subject: [PATCH] FIX Merge field markup to match core SS4 field markup, add button_text config static --- code/Form/UserForm.php | 6 ++++++ code/Model/EditableFormField.php | 17 ++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/code/Form/UserForm.php b/code/Form/UserForm.php index bc76f8a..cc0623d 100644 --- a/code/Form/UserForm.php +++ b/code/Form/UserForm.php @@ -17,6 +17,12 @@ use SilverStripe\UserForms\FormField\UserFormsFieldList; */ class UserForm extends Form { + /** + * @config + * @var string + */ + private static $button_text = ''; + /** * @param Controller $controller * @param string $name diff --git a/code/Model/EditableFormField.php b/code/Model/EditableFormField.php index 41fe13e..5afe044 100755 --- a/code/Model/EditableFormField.php +++ b/code/Model/EditableFormField.php @@ -237,15 +237,14 @@ class EditableFormField extends DataObject CheckboxField::create('ShowInSummary', _t(__CLASS__.'.SHOWINSUMMARY', 'Show in summary gridfield')), LiteralField::create( 'MergeField', - _t( - __CLASS__.'.MERGEFIELDNAME', - '
' . - '' . - '
' . - '$' . $this->Name . '' . - '
' . - '
' - ) + '
' . + '' + . '
' + . '$' . $this->Name . '' + . '
' + . '
' ), TextField::create('Title', _t(__CLASS__.'.TITLE', 'Title')), TextField::create('Default', _t(__CLASS__.'.DEFAULT', 'Default value')),