mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Reduced HTML validation errors in CMS and FieldGroup
This commit is contained in:
parent
bc2bb53274
commit
4d28b79c1b
@ -568,7 +568,7 @@ class LeftAndMain extends Controller {
|
||||
$treeTitle = '...';
|
||||
}
|
||||
|
||||
$html = "<ul><li id=\"record-0\" data-id=\"0\"class=\"Root nodelete\"><a href=\"$rootLink\"><strong>$treeTitle</strong></a>"
|
||||
$html = "<ul><li id=\"record-0\" data-id=\"0\" class=\"Root nodelete\"><a href=\"$rootLink\"><strong>$treeTitle</strong></a>"
|
||||
. $html . "</li></ul>";
|
||||
}
|
||||
|
||||
@ -1227,6 +1227,13 @@ class LeftAndMain extends Controller {
|
||||
return ($this->request->getVar('cms-preview-expanded'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
function Locale() {
|
||||
return DBField::create('DBLocale', $this->i18nLocale());
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the given javascript file as required in the CMS.
|
||||
* Filenames should be relative to the base, eg, SAPPHIRE_DIR . '/javascript/loader.js'
|
||||
|
@ -2,12 +2,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-language" content="$i18nLocale" />
|
||||
<% base_tag %>
|
||||
<title>$Title</title>
|
||||
</head>
|
||||
|
||||
<body class="loading cms">
|
||||
<body class="loading cms" lang="$Locale.RFC1766">
|
||||
|
||||
<% include CMSLoadingScreen %>
|
||||
|
||||
@ -18,7 +17,7 @@
|
||||
$Content
|
||||
|
||||
<div class="cms-preview east <% if IsPreviewExpanded %>is-expanded<% else %>is-collapsed<% end_if %>" data-layout="{type: 'border'}">
|
||||
<iframe src="$PreviewLink" class="center"></iframe>
|
||||
<iframe src="<% if $PreviewLink %>$PreviewLink<% else %>about:blank<% end_if %>" class="center"></iframe>
|
||||
<div class="cms-preview-controls south"></div>
|
||||
</div>
|
||||
|
||||
|
@ -136,9 +136,10 @@ class FieldGroup extends CompositeField {
|
||||
$titleBlock = (!empty($Title)) ? "<label class=\"left\">$Title</label>" : "";
|
||||
$messageBlock = (!empty($Message)) ? "<span class=\"message $MessageType\">$Message</span>" : "";
|
||||
$rightTitleBlock = (!empty($RightTitle)) ? "<label class=\"right\">$RightTitle</label>" : "";
|
||||
$id = $Name ? ' id="$Name"' : '';
|
||||
|
||||
return <<<HTML
|
||||
<div id="$Name" class="field $Type $extraClass">$titleBlock<div class="middleColumn">$Field</div>$rightTitleBlock$messageBlock</div>
|
||||
<div$id class="field $Type $extraClass">$titleBlock<div class="middleColumn">$Field</div>$rightTitleBlock$messageBlock</div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user