mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix page reordering bug with ParentID
If you are viewing PageA in the CMS, but move PageB into PageC, the edit form will recieve an edit form ParentID of PageC. This is incorrect, as only PageB had it's ParentID change.
This commit is contained in:
parent
04e167ad4c
commit
6030854725
@ -105,7 +105,10 @@
|
|||||||
SiblingIDs: siblingIDs
|
SiblingIDs: siblingIDs
|
||||||
},
|
},
|
||||||
success: function() {
|
success: function() {
|
||||||
|
// We only need to update the ParentID if the current page we're on is the page being moved
|
||||||
|
if ($('.cms-edit-form :input[name=ID]').val() == nodeID) {
|
||||||
$('.cms-edit-form :input[name=ParentID]').val(newParentID);
|
$('.cms-edit-form :input[name=ParentID]').val(newParentID);
|
||||||
|
}
|
||||||
self.updateNodesFromServer([nodeID]);
|
self.updateNodesFromServer([nodeID]);
|
||||||
},
|
},
|
||||||
statusCode: {
|
statusCode: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user