Compare commits
2 Commits
9ab3ed67a7
...
a9b0a70155
Author | SHA1 | Date |
---|---|---|
Niklas Forsdahl | a9b0a70155 | |
Niklas Forsdahl | 8f505659f0 |
|
@ -288,7 +288,7 @@ class GridFieldNestedForm extends AbstractGridFieldComponent implements
|
|||
$list = $gridField->getList();
|
||||
$id = isset($move['id']) ? (int) $move['id'] : null;
|
||||
if (!$id) {
|
||||
throw new HTTPResponse_Exception('Missing ID', 400);
|
||||
throw new HTTPResponse_Exception('Missing ID', 404);
|
||||
}
|
||||
$to = isset($move['parent']) ? (int)$move['parent'] : null;
|
||||
// should be possible either on parent or child grid field, or nested grid field from parent
|
||||
|
|
|
@ -73,7 +73,7 @@ class GridFieldNestedFormItemRequest extends GridFieldDetailForm_ItemRequest
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->record->hasExtension(Hierarchy::class)) {
|
||||
if ($this->record->hasExtension(Hierarchy::class) && $relationClass == get_class($this->record)) {
|
||||
$config->addComponent($nestedForm = new GridFieldNestedForm(), GridFieldOrderableRows::class);
|
||||
// use max nesting level from parent component
|
||||
$nestedForm->setMaxNestingLevel($this->component->getMaxNestingLevel());
|
||||
|
|
Loading…
Reference in New Issue