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
|
class UserForm extends Form
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @config
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private static $button_text = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Controller $controller
|
* @param Controller $controller
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
@ -237,15 +237,14 @@ class EditableFormField extends DataObject
|
|||||||
CheckboxField::create('ShowInSummary', _t(__CLASS__.'.SHOWINSUMMARY', 'Show in summary gridfield')),
|
CheckboxField::create('ShowInSummary', _t(__CLASS__.'.SHOWINSUMMARY', 'Show in summary gridfield')),
|
||||||
LiteralField::create(
|
LiteralField::create(
|
||||||
'MergeField',
|
'MergeField',
|
||||||
_t(
|
'<div class="form-group field readonly">' .
|
||||||
__CLASS__.'.MERGEFIELDNAME',
|
'<label class="left form__field-label" for="Form_ItemEditForm_MergeField">'
|
||||||
'<div class="field readonly">' .
|
. _t(__CLASS__.'.MERGEFIELDNAME', 'Merge field')
|
||||||
'<label class="left">' . _t(__CLASS__.'.MERGEFIELDNAME', 'Merge field') . '</label>' .
|
. '</label>'
|
||||||
'<div class="middleColumn">' .
|
. '<div class="form__field-holder">'
|
||||||
'<span class="readonly">$' . $this->Name . '</span>' .
|
. '<span class="readonly" id="Form_ItemEditForm_MergeField">$' . $this->Name . '</span>'
|
||||||
'</div>' .
|
. '</div>'
|
||||||
'</div>'
|
. '</div>'
|
||||||
)
|
|
||||||
),
|
),
|
||||||
TextField::create('Title', _t(__CLASS__.'.TITLE', 'Title')),
|
TextField::create('Title', _t(__CLASS__.'.TITLE', 'Title')),
|
||||||
TextField::create('Default', _t(__CLASS__.'.DEFAULT', 'Default value')),
|
TextField::create('Default', _t(__CLASS__.'.DEFAULT', 'Default value')),
|
||||||
|
Loading…
Reference in New Issue
Block a user