Skip to content

Commit

Permalink
GalleryImage - remove Link field (#78)
Browse files Browse the repository at this point in the history
closes dynamic/para-world-sailing-installer#36

Moved Photos gridfield to Main tab for better UX
  • Loading branch information
jsirish committed Mar 27, 2018
1 parent 7caa846 commit ddc6da0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Elements/ElementPhotoGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getCMSFields()
$config->removeComponentsByType(GridFieldDeleteAction::class);
$config->addComponent(new GridFieldDeleteAction(false));
$imagesField = GridField::create('Images', 'Images', $this->Images()->sort('SortOrder'), $config);
$fields->addFieldToTab('Root.Photos', $imagesField);
$fields->addFieldToTab('Root.Main', $imagesField);
}

return $fields;
Expand Down
1 change: 1 addition & 0 deletions src/Model/GalleryImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public function getCMSFields()
$fields->removeByName(array(
'SortOrder',
'PhotoGalleryID',
'ElementLinkID',
));
$image = $fields->dataFieldByName('Image')->setFolderName('Uploads/Elements/PhotoGallery/');
$fields->insertBefore($image, 'Content');
Expand Down

0 comments on commit ddc6da0

Please sign in to comment.