From d0571cd14d8d712a8d6d30bb41612a5c19d468c9 Mon Sep 17 00:00:00 2001 From: daniquilez Date: Thu, 8 May 2014 15:57:08 +0200 Subject: [PATCH] addBulkAction improvement addBulkAction function should overwrite config instead of defining a default one when adding a custom action. --- code/GridFieldBulkManager.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/GridFieldBulkManager.php b/code/GridFieldBulkManager.php index 983cd00..169f532 100644 --- a/code/GridFieldBulkManager.php +++ b/code/GridFieldBulkManager.php @@ -211,9 +211,9 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr } else{ $config = array( - 'isAjax' => true, - 'icon' => 'accept', - 'isDestructive' => false + 'isAjax' => isset($config['isAjax']) ? $config['isAjax'] : true, + 'icon' => isset($config['icon']) ? $config['icon'] : 'accept', + 'isDestructive' => isset($config['isDestructive']) ? $config['isDestructive'] : false ); } @@ -379,4 +379,4 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr user_error("Unable to find matching bulk action handler for ".$request->remaining().'.', E_USER_ERROR); } -} \ No newline at end of file +}