mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #732 from jcwacky/3.0
BUGFIX: GridField delete icon now correctly deletes, rather than always ...
This commit is contained in:
commit
a45f4a4c29
@ -133,7 +133,11 @@ class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_Actio
|
||||
if($actionName == 'deleterecord' && !$item->canDelete()) {
|
||||
throw new ValidationException(_t('GridFieldAction_Delete.DeletePermissionsFailure',"No delete permissions"),0);
|
||||
}
|
||||
$gridField->getList()->remove($item);
|
||||
if($actionName == 'deleterecord') {
|
||||
$item->delete();
|
||||
} else {
|
||||
$gridField->getList()->remove($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user