mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR: Added i18n support for 'Choose where to create this page' part of add page UI.
This commit is contained in:
parent
4225c0a966
commit
0542696d47
@ -33,16 +33,21 @@ class CMSPageAddController extends CMSMain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><span class="title">%s</span></span>';
|
$numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><span class="title">%s</span></span>';
|
||||||
|
|
||||||
|
$topTitle = _t('CMSPageAddController.ParentMode_top', 'Top level');
|
||||||
|
$childTitle = _t('CMSPageAddController.ParentMode_child', 'Under another page');
|
||||||
|
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
// new HiddenField("ParentID", false, ($this->parentRecord) ? $this->parentRecord->ID : null),
|
// new HiddenField("ParentID", false, ($this->parentRecord) ? $this->parentRecord->ID : null),
|
||||||
// TODO Should be part of the form attribute, but not possible in current form API
|
// TODO Should be part of the form attribute, but not possible in current form API
|
||||||
$hintsField = new LiteralField('Hints', sprintf('<span class="hints" data-hints="%s"></span>', $this->SiteTreeHints())),
|
$hintsField = new LiteralField('Hints', sprintf('<span class="hints" data-hints="%s"></span>', $this->SiteTreeHints())),
|
||||||
new LiteralField('PageModeHeader', sprintf($numericLabelTmpl, 1, _t('CMSMain.ChoosePageParentMode', 'Choose where to create this page'))),
|
new LiteralField('PageModeHeader', sprintf($numericLabelTmpl, 1, _t('CMSMain.ChoosePageParentMode', 'Choose where to create this page'))),
|
||||||
|
|
||||||
$parentModeField = new SelectionGroup(
|
$parentModeField = new SelectionGroup(
|
||||||
"ParentModeField",
|
"ParentModeField",
|
||||||
array(
|
array(
|
||||||
"top//Top level" => null, //new LiteralField("Dummy", ''),
|
"top//$topTitle" => null, //new LiteralField("Dummy", ''),
|
||||||
"child//Under another page" => $parentField = new TreeDropdownField(
|
"child//$childTitle" => $parentField = new TreeDropdownField(
|
||||||
"ParentID",
|
"ParentID",
|
||||||
"",
|
"",
|
||||||
'SiteTree'
|
'SiteTree'
|
||||||
|
Loading…
Reference in New Issue
Block a user