Merge pull request #2547 from creative-commoners/pulls/4.5/fix-page-location-title

FIX Correct placement of 'Page location' field title
This commit is contained in:
Robbie Averill 2020-05-01 10:06:04 -07:00 committed by GitHub
commit 2663db06b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2146,13 +2146,13 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
$this->fieldLabel('ClassName'), $this->fieldLabel('ClassName'),
$this->getClassDropdown() $this->getClassDropdown()
), ),
$parentTypeSelector = new CompositeField( $parentTypeSelector = (new CompositeField(
$parentType = new OptionsetField("ParentType", _t("SilverStripe\\CMS\\Model\\SiteTree.PAGELOCATION", "Page location"), array( $parentType = new OptionsetField("ParentType", "", array(
"root" => _t("SilverStripe\\CMS\\Model\\SiteTree.PARENTTYPE_ROOT", "Top-level page"), "root" => _t("SilverStripe\\CMS\\Model\\SiteTree.PARENTTYPE_ROOT", "Top-level page"),
"subpage" => _t("SilverStripe\\CMS\\Model\\SiteTree.PARENTTYPE_SUBPAGE", "Sub-page underneath a parent page"), "subpage" => _t("SilverStripe\\CMS\\Model\\SiteTree.PARENTTYPE_SUBPAGE", "Sub-page underneath a parent page"),
)), )),
$parentIDField = new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), self::class, 'ID', 'MenuTitle') $parentIDField = new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), self::class, 'ID', 'MenuTitle')
), ))->setTitle(_t("SilverStripe\\CMS\\Model\\SiteTree.PAGELOCATION", "Page location")),
$visibility = new FieldGroup( $visibility = new FieldGroup(
new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')), new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')),
new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch')) new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch'))