Skip to content

Commit

Permalink
Removed delete button on gridfields (#85)
Browse files Browse the repository at this point in the history
- because delete did not unpublish, it left the published version
  • Loading branch information
mak001 authored Apr 19, 2018
1 parent 477e14c commit faee3de
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/Elements/ElementAccordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public function getCMSFields()
$config->addComponent(new GridFieldOrderableRows('Sort'));
$config->removeComponentsByType(GridFieldAddExistingAutocompleter::class);
$config->removeComponentsByType(GridFieldDeleteAction::class);
$config->addComponent(new GridFieldDeleteAction(false));
}
});

Expand Down
1 change: 0 additions & 1 deletion src/Elements/ElementFeatures.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public function getCMSFields()
$config->addComponent(new GridFieldOrderableRows());
$config->removeComponentsByType(GridFieldAddExistingAutocompleter::class);
$config->removeComponentsByType(GridFieldDeleteAction::class);
$config->addComponent(new GridFieldDeleteAction(false));
}
});

Expand Down
1 change: 0 additions & 1 deletion src/Elements/ElementPhotoGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function getCMSFields()
$config->addComponent(new GridFieldOrderableRows('SortOrder'));
$config->removeComponentsByType(GridFieldAddExistingAutocompleter::class);
$config->removeComponentsByType(GridFieldDeleteAction::class);
$config->addComponent(new GridFieldDeleteAction(false));
$imagesField = GridField::create('Images', 'Images', $this->Images()->sort('SortOrder'), $config);
$fields->addFieldToTab('Root.Main', $imagesField);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Elements/ElementPromos.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function getCMSFields()
$config->addComponent(new GridFieldOrderableRows('SortOrder'));
$config->removeComponentsByType(GridFieldAddExistingAutocompleter::class);
$config->addComponent(new GridFieldAddExistingSearchButton());

$config->removeComponentsByType(GridFieldDeleteAction::class);
$fields->addFieldsToTab('Root.Promos', array(
$promoField,
));
Expand Down

0 comments on commit faee3de

Please sign in to comment.