mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 15:05:39 +00:00
Added support for dot notation in GridField name
When you want to have a GridField for a sub-relation on a relation of your DataObject you use dot notation, this breaks the functionality of GridFieldOrderableRows because in the POST request the dot is replaced by an underscore.
This commit is contained in:
parent
8e37021317
commit
4d94b2748d
@ -396,7 +396,12 @@ class GridFieldOrderableRows extends RequestHandler implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get records from the `GridFieldEditableColumns` column
|
// Get records from the `GridFieldEditableColumns` column
|
||||||
$data = $request->postVar($grid->getName());
|
$gridFieldName = $grid->getName();
|
||||||
|
if (strpos($gridFieldName, '.') !== false) {
|
||||||
|
$gridFieldName = str_replace('.', '_', $gridFieldName);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $request->postVar($gridFieldName);
|
||||||
$sortedIDs = $this->getSortedIDs($data);
|
$sortedIDs = $this->getSortedIDs($data);
|
||||||
if (!$this->executeReorder($grid, $sortedIDs)) {
|
if (!$this->executeReorder($grid, $sortedIDs)) {
|
||||||
$this->httpError(400);
|
$this->httpError(400);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user