Skip to content

Commit

Permalink
Merge pull request #9019 from rafaeldsousa/pull/include-cancreate-che…
Browse files Browse the repository at this point in the history
…ck-gridfield-rightgroupfield

Including canCreate in if statement so that button gets removed if us…
  • Loading branch information
robbieaverill authored Jun 9, 2019
2 parents 761f7d1 + f7c1be7 commit 179a982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/GridField/GridFieldDetailForm_ItemRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ protected function getRightGroupField()

$rightGroup->push($previousAndNextGroup);

if ($component && $component->getShowAdd()) {
if ($component && $component->getShowAdd() && $this->record->canCreate()) {
$rightGroup->push(
LiteralField::create(
'new-record',
Expand Down

0 comments on commit 179a982

Please sign in to comment.