FIX Add namespaces for UserFormsOptionSetField template and EditableMultipleOptionField templates

This commit is contained in:
Robbie Averill 2017-08-22 11:30:37 +12:00
parent d3d2ae591f
commit 91bac6dcf4
5 changed files with 4 additions and 5 deletions

View File

@ -25,9 +25,8 @@ class EditableCheckboxGroupField extends EditableMultipleOptionField
public function getFormField()
{
$field = UserFormsCheckboxSetField::create($this->Name, $this->EscapedTitle, $this->getOptionsMap());
$field->setFieldHolderTemplate(EditableMultipleOptionField::class . '_holder');
$field->setTemplate('UserFormsCheckboxSetField'); // @todo
$field = UserFormsCheckboxSetField::create($this->Name, $this->EscapedTitle, $this->getOptionsMap())
->setFieldHolderTemplate(EditableMultipleOptionField::class . '_holder');
// Set the default checked items
$defaultCheckedItems = $this->getDefaultOptions();

View File

@ -37,7 +37,7 @@ class EditableRadioField extends EditableMultipleOptionField
{
$field = OptionsetField::create($this->Name, $this->EscapedTitle, $this->getOptionsMap())
->setFieldHolderTemplate(EditableMultipleOptionField::class . '_holder')
->setTemplate('UserFormsOptionSetField'); // @todo
->setTemplate('SilverStripe\\UserForms\\FormField\\UserFormsOptionSetField');
// Set default item
$defaultOption = $this->getDefaultOptions()->first();

View File

@ -347,7 +347,7 @@ class EmailRecipient extends DataObject
)
->addExtraClass('toggle-plain-only'),
LiteralField::create('EmailPreview', $preview)
));
]);
$fields->fieldByName('Root.EmailContent')->setTitle(_t(__CLASS__.'.EMAILCONTENTTAB', 'Email Content'));