Merge pull request #33 from creative-commoners/pulls/2.0/escaped-right-title

FIX Cast IFrameURL right title as HTMLText to avoid double escaping
This commit is contained in:
Dylan Wagstaff 2018-04-03 22:30:34 +12:00 committed by GitHub
commit ab75e0cb46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,7 @@ use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\NumericField;
use SilverStripe\Forms\HTMLEditor\HtmlEditorField;
use SilverStripe\ORM\FieldType\DBField;
/**
* Iframe page type embeds an iframe of URL of choice into the page.
@ -46,7 +47,10 @@ class IFramePage extends Page
$fields->removeFieldFromTab('Root.Main', 'Content');
$fields->addFieldToTab('Root.Main', $url = new TextField('IFrameURL', 'Iframe URL'));
$url->setRightTitle(
'Can be absolute (<em>http://silverstripe.com</em>) or relative to this site (<em>about-us</em>).'
DBField::create_field(
'HTMLText',
'Can be absolute (<em>http://silverstripe.com</em>) or relative to this site (<em>about-us</em>).'
)
);
$fields->addFieldToTab(
'Root.Main',