MNT Broken builds

This commit is contained in:
Steve Boyd 2023-01-19 21:16:49 +13:00
parent 2024622c0c
commit 14e1e5e1fa
2 changed files with 6 additions and 5 deletions

View File

@ -11,6 +11,7 @@ use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\CompositeField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\View\Parsers\HTMLValue;
/**
* Editable Literal Field. A literal field is just a blank slate where
@ -83,7 +84,7 @@ class EditableLiteralField extends EditableFormField
}
// Perform sanitisation
$htmlValue = Injector::inst()->create('HTMLValue', $content);
$htmlValue = Injector::inst()->create(HTMLValue::class, $content);
$santiser = Injector::inst()->create(HTMLEditorSanitiser::class, $this->getEditorConfig());
$santiser->sanitise($htmlValue);
return $htmlValue->getContent();
@ -122,16 +123,16 @@ class EditableLiteralField extends EditableFormField
$fields->removeByName(['Default', 'Validation', 'RightTitle']);
$fields->addFieldsToTab('Root.Main', [
HTMLEditorField::create('Content', _t(__CLASS__.'.CONTENT', 'HTML'))
HTMLEditorField::create('Content', _t(__CLASS__ . '.CONTENT', 'HTML'))
->setRows(4)
->setColumns(20),
CheckboxField::create(
'HideFromReports',
_t(__CLASS__.'.HIDEFROMREPORT', 'Hide from reports?')
_t(__CLASS__ . '.HIDEFROMREPORT', 'Hide from reports?')
),
CheckboxField::create(
'HideLabel',
_t(__CLASS__.'.HIDELABEL', "Hide 'Title' label on frontend?")
_t(__CLASS__ . '.HIDELABEL', "Hide 'Title' label on frontend?")
)
]);
});

View File

@ -103,7 +103,7 @@ class EditableMultipleOptionField extends EditableFormField
$optionsConfig
);
$fields->insertAfter(Tab::create('Options', _t(__CLASS__.'.OPTIONSTAB', 'Options')), 'Main');
$fields->insertAfter('Main', Tab::create('Options', _t(__CLASS__.'.OPTIONSTAB', 'Options')));
$fields->addFieldToTab('Root.Options', $optionsGrid);
});