File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -97,16 +97,14 @@ class Company extends DataObject
9797
9898 public function getCMSFields ()
9999 {
100- $ fields = parent ::getCMSFields ();
101- $ fields ->addFieldsToTab ('Root.Main ' , [
102- ReadonlyField::create ('IntentionallyEmpty ' ),
103- ReadonlyField::create ('ReadonlyWithValue ' , null , '<i>Read-only value</i> ' ),
104- $ uploadField = UploadField::create ('GroupPhotos ' ),
105- ]);
106- $ uploadField ->setAllowedFileCategories ('image ' );
107100 $ this ->beforeUpdateCMSFields (function ($ fields ) {
108- $ fields -> addFieldToTab ( ' Root.Main ' , $ uploadField = UploadField::create ('GroupPhotos ' ) );
101+ $ uploadField = UploadField::create ('GroupPhotos ' );
109102 $ uploadField ->setAllowedFileCategories ('image ' );
103+ $ fields ->addFieldsToTab ('Root.Main ' , [
104+ ReadonlyField::create ('IntentionallyEmpty ' ),
105+ ReadonlyField::create ('ReadonlyWithValue ' , null , '<i>Read-only value</i> ' ),
106+ $ uploadField ,
107+ ]);
110108 });
111109 return parent ::getCMSFields ();
112110 }
You can’t perform that action at this time.
0 commit comments