mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
BUGFIX: Improved reliability of SubsiteTreeDropdownField (by getvar length shorter) (from r89840)
This commit is contained in:
parent
2d940ae53e
commit
0ba7ee6b17
@ -39,8 +39,8 @@ class RelatedPageLink extends DataObject {
|
||||
"MenuTitle"
|
||||
);
|
||||
|
||||
if (isset($_GET['TreeDropdownField_ComplexTableField_Popup_AddForm_RelatedPageID_SubsiteID'])) {
|
||||
$pageSelectionField->setSubsiteID($_GET['TreeDropdownField_ComplexTableField_Popup_AddForm_RelatedPageID_SubsiteID']);
|
||||
if (isset($_GET['RelatedPageID_SubsiteID'])) {
|
||||
$pageSelectionField->setSubsiteID($_GET['RelatedPageID_SubsiteID']);
|
||||
}
|
||||
|
||||
$pageSelectionField->setFilterFunction(create_function('$item', 'return $item->ClassName != "VirtualPage";'));
|
||||
|
@ -38,7 +38,7 @@ class SubsitesVirtualPage extends VirtualPage {
|
||||
$pageSelectionField->setFilterFunction(create_function('$item', 'return $item->ClassName != "VirtualPage";'));
|
||||
|
||||
if(Controller::curr()->getRequest()) {
|
||||
$subsiteID = Controller::curr()->getRequest()->getVar('TreeDropdownField_Form_EditForm_CopyContentFromID_SubsiteID');
|
||||
$subsiteID = Controller::curr()->getRequest()->getVar('CopyContentFromID_SubsiteID');
|
||||
$pageSelectionField->setSubsiteID($subsiteID);
|
||||
}
|
||||
$fields->replaceField('CopyContentFromID', $pageSelectionField);
|
||||
|
@ -20,7 +20,7 @@ SubsitesTreeDropdownField.prototype = {
|
||||
else var ajaxURL = baseURL+ 'gettree?forceValues=' + this.inputTag.value;
|
||||
|
||||
// Customized: Append subsiteid (evaluated in SubsitesVirtualPage.php)
|
||||
ajaxURL += '&' + this.id + '_SubsiteID=' + parseInt(this.subsiteID());
|
||||
ajaxURL += '&' + this.inputTag.name + '_SubsiteID=' + parseInt(this.subsiteID());
|
||||
|
||||
ajaxURL += $('SecurityID') ? '&SecurityID=' + $('SecurityID').value : '';
|
||||
new Ajax.Request(ajaxURL, {
|
||||
@ -49,7 +49,7 @@ SubsitesTreeDropdownField.prototype = {
|
||||
while (tree && !tree.className.match(/(^| )SubsitesTreeDropdownField( |$)/)) tree = tree.parentNode;
|
||||
|
||||
// Customized: Append subsiteid (evaluated in SubsitesVirtualPage.php)
|
||||
ajaxURL += '&' + this.id + '_SubsiteID=' + parseInt(this.tree.options.dropdownField.subsiteID());
|
||||
ajaxURL += '&' + this.inputTag.name + '_SubsiteID=' + parseInt(this.tree.options.dropdownField.subsiteID());
|
||||
ajaxURL += $('SecurityID') ? '&SecurityID=' + $('SecurityID').value : '';
|
||||
|
||||
new Ajax.Request(ajaxURL, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user