mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
FIX Merge field markup to match core SS4 field markup, add button_text config static
This commit is contained in:
parent
98731f42b6
commit
d66b06dbe4
@ -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
|
||||
|
@ -237,15 +237,14 @@ class EditableFormField extends DataObject
|
||||
CheckboxField::create('ShowInSummary', _t(__CLASS__.'.SHOWINSUMMARY', 'Show in summary gridfield')),
|
||||
LiteralField::create(
|
||||
'MergeField',
|
||||
_t(
|
||||
__CLASS__.'.MERGEFIELDNAME',
|
||||
'<div class="field readonly">' .
|
||||
'<label class="left">' . _t(__CLASS__.'.MERGEFIELDNAME', 'Merge field') . '</label>' .
|
||||
'<div class="middleColumn">' .
|
||||
'<span class="readonly">$' . $this->Name . '</span>' .
|
||||
'</div>' .
|
||||
'</div>'
|
||||
)
|
||||
'<div class="form-group field readonly">' .
|
||||
'<label class="left form__field-label" for="Form_ItemEditForm_MergeField">'
|
||||
. _t(__CLASS__.'.MERGEFIELDNAME', 'Merge field')
|
||||
. '</label>'
|
||||
. '<div class="form__field-holder">'
|
||||
. '<span class="readonly" id="Form_ItemEditForm_MergeField">$' . $this->Name . '</span>'
|
||||
. '</div>'
|
||||
. '</div>'
|
||||
),
|
||||
TextField::create('Title', _t(__CLASS__.'.TITLE', 'Title')),
|
||||
TextField::create('Default', _t(__CLASS__.'.DEFAULT', 'Default value')),
|
||||
|
Loading…
Reference in New Issue
Block a user