Merge pull request #2085 from creative-commoners/pulls/4.1/warning-classes

NEW Use Bootstrap alerts instead of legacy message classes for install.php warning
This commit is contained in:
Loz Calver 2018-02-02 09:08:49 +00:00 committed by GitHub
commit fb30448033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

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