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()) {
|
if($actionName == 'deleterecord' && !$item->canDelete()) {
|
||||||
throw new ValidationException(_t('GridFieldAction_Delete.DeletePermissionsFailure',"No delete permissions"),0);
|
throw new ValidationException(_t('GridFieldAction_Delete.DeletePermissionsFailure',"No delete permissions"),0);
|
||||||
}
|
}
|
||||||
|
if($actionName == 'deleterecord') {
|
||||||
|
$item->delete();
|
||||||
|
} else {
|
||||||
$gridField->getList()->remove($item);
|
$gridField->getList()->remove($item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user