mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX Fixed field addition bug in SubsitesVirtualPage
This commit is contained in:
parent
83fb26cc3e
commit
3315786c66
@ -10,17 +10,19 @@ class SubsitesVirtualPage extends VirtualPage {
|
||||
$subsites->push(new ArrayData(array('Title' => 'Main site', 'ID' => 0)));
|
||||
}
|
||||
|
||||
if($subsites->Count()) $subsiteSelectionField = new DropdownField(
|
||||
"CopyContentFromID_SubsiteID",
|
||||
"Subsite",
|
||||
$subsites->toDropdownMap('ID', 'Title'),
|
||||
($this->CopyContentFromID) ? $this->CopyContentFrom()->SubsiteID : Session::get('SubsiteID')
|
||||
);
|
||||
$fields->addFieldToTab(
|
||||
'Root.Content.Main',
|
||||
$subsiteSelectionField,
|
||||
'CopyContentFromID'
|
||||
);
|
||||
if($subsites->Count()) {
|
||||
$subsiteSelectionField = new DropdownField(
|
||||
"CopyContentFromID_SubsiteID",
|
||||
"Subsite",
|
||||
$subsites->toDropdownMap('ID', 'Title'),
|
||||
($this->CopyContentFromID) ? $this->CopyContentFrom()->SubsiteID : Session::get('SubsiteID')
|
||||
);
|
||||
$fields->addFieldToTab(
|
||||
'Root.Content.Main',
|
||||
$subsiteSelectionField,
|
||||
'CopyContentFromID'
|
||||
);
|
||||
}
|
||||
|
||||
// Setup the linking to the original page.
|
||||
$pageSelectionField = new SubsitesTreeDropdownField(
|
||||
|
Loading…
Reference in New Issue
Block a user