Skip to content

Commit

Permalink
FlexSlider - GridFieldBulkUpload
Browse files Browse the repository at this point in the history
if class_exists, add bulk tools to gridfield
  • Loading branch information
jsirish committed Apr 15, 2016
1 parent b435f20 commit f30a1cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/FlexSlider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public function updateCMSFields(FieldList $fields)
if (class_exists('GridFieldSortableRows')) {
$config->addComponent(new GridFieldSortableRows('SortOrder'));
}
if (class_exists('GridFieldBulkUpload')) {
$config->addComponent(new GridFieldBulkUpload());
$config->addComponent(new GridFieldBulkManager());
}
$config->removeComponentsByType('GridFieldAddExistingAutocompleter');
$config->removeComponentsByType('GridFieldDeleteAction');
$config->addComponent(new GridFieldDeleteAction(false));
Expand Down

0 comments on commit f30a1cc

Please sign in to comment.