NEW Use Bootstrap alerts instead of legacy message classes for install.php warning

This commit is contained in:
Robbie Averill 2018-02-02 13:02:47 +13:00
parent 1db01ecce6
commit f582954aea

View File

@ -1968,14 +1968,14 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
} }
if (file_exists(BASE_PATH . '/install.php')) { if (file_exists(BASE_PATH . '/install.php')) {
$fields->addFieldToTab("Root.Main", new LiteralField( $fields->addFieldToTab('Root.Main', LiteralField::create(
"InstallWarningHeader", 'InstallWarningHeader',
"<p class=\"message warning\">" . _t( '<div class="alert alert-warning">' . _t(
"SilverStripe\\CMS\\Model\\SiteTree.REMOVE_INSTALL_WARNING", __CLASS__ . '.REMOVE_INSTALL_WARNING',
"Warning: You should remove install.php from this SilverStripe install for security reasons." "Warning: You should remove install.php from this SilverStripe install for security reasons."
) )
. "</p>" . '</div>'
), "Title"); ), 'Title');
} }
if (self::$runCMSFieldsExtensions) { if (self::$runCMSFieldsExtensions) {