diff --git a/code/Forms/AssetFormFactory.php b/code/Forms/AssetFormFactory.php index dbb052556..45b372d3f 100644 --- a/code/Forms/AssetFormFactory.php +++ b/code/Forms/AssetFormFactory.php @@ -9,6 +9,7 @@ use SilverStripe\Core\Config\Configurable; use SilverStripe\Core\Extensible; use SilverStripe\Core\Injector\Injectable; +use SilverStripe\Forms\CheckboxField; use SilverStripe\Forms\FieldGroup; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\Form; @@ -370,7 +371,7 @@ protected function getFormFieldSecurityTab($record, $context = []) unset($editorsOptionsField[InheritedPermissions::ANYONE]); $membersMap = Member::get()->map('ID', 'Name'); - return Tab::create( + $tab = Tab::create( 'Permissions', OptionsetField::create( 'CanViewType', @@ -401,6 +402,17 @@ protected function getFormFieldSecurityTab($record, $context = []) $membersMap ) ); + + if ($record instanceof File) { + $tab->push( + CheckboxField::create( + 'ShowInSearch', + _t(__CLASS__.'.SHOWINSEARRCH', 'Show in search?') + ) + ); + } + + return $tab; } public function getRequiredContext()