From 3c131266d2191d68e2d71caa61e29d776cce3f45 Mon Sep 17 00:00:00 2001 From: Jason Irish Date: Wed, 3 Oct 2018 14:28:37 -0500 Subject: [PATCH] ProductHolder - Products GridField cleanup (#320) --- code/pages/ProductHolder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/pages/ProductHolder.php b/code/pages/ProductHolder.php index 2e8a7ac..cefadac 100644 --- a/code/pages/ProductHolder.php +++ b/code/pages/ProductHolder.php @@ -55,10 +55,11 @@ public function getCMSFields() if (class_exists('GridFieldSortableRows')) { $config->addComponent(new GridFieldSortableRows('SortOrder')); } - if (class_exists('GridFieldManyRelationHandler')) { + if (class_exists('GridFieldAddExistingSearchButton')) { $config->removeComponentsByType('GridFieldAddExistingAutocompleter'); - $config->addComponent(new GridFieldManyRelationHandler()); + $config->addComponent(new GridFieldAddExistingSearchButton()); } + $config->removeComponentsByType('GridFieldAddNewButton'); $fields->addFieldToTab( 'Root.Products', GridField::create(