mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
Merge pull request #69 from daniquilez/patch-3
display edit all only when the action is enabled.
This commit is contained in:
commit
619346fc32
@ -232,11 +232,17 @@ class GridFieldBulkUpload implements GridField_HTMLProvider, GridField_URLHandle
|
|||||||
->setAttribute('data-url', $gridField->Link('bulkupload/cancel'))
|
->setAttribute('data-url', $gridField->Link('bulkupload/cancel'))
|
||||||
->setUseButtonTag(true);
|
->setUseButtonTag(true);
|
||||||
|
|
||||||
|
$bulkManager_config = $bulkManager->first()->getConfig();
|
||||||
|
$bulkManager_actions = $bulkManager_config['actions'];
|
||||||
|
if(array_key_exists('bulkedit' , $bulkManager_actions)){
|
||||||
$editAllButton = FormAction::create('EditAll', _t('GRIDFIELD_BULK_UPLOAD.EDIT_ALL_BTN_LABEL', 'Edit all'))
|
$editAllButton = FormAction::create('EditAll', _t('GRIDFIELD_BULK_UPLOAD.EDIT_ALL_BTN_LABEL', 'Edit all'))
|
||||||
->addExtraClass('bulkUploadEditButton')
|
->addExtraClass('bulkUploadEditButton')
|
||||||
->setAttribute('data-icon', 'pencil')
|
->setAttribute('data-icon', 'pencil')
|
||||||
->setAttribute('data-url', $gridField->Link('bulkupload/edit'))
|
->setAttribute('data-url', $gridField->Link('bulkupload/edit'))
|
||||||
->setUseButtonTag(true);
|
->setUseButtonTag(true);
|
||||||
|
}else{
|
||||||
|
$editAllButton = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$cancelButton = '';
|
$cancelButton = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user