FIX: Replace link field

This commit is contained in:
Tony Air 2022-07-02 18:19:07 +02:00
parent b95de9a58f
commit 936bca73e9
2 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,8 @@
"a2nt/silverstripe-elemental-basics": "*", "a2nt/silverstripe-elemental-basics": "*",
"silverstripe/widgets": "*", "silverstripe/widgets": "*",
"drmartingonzo/ss-tinymce-charcount": "*", "drmartingonzo/ss-tinymce-charcount": "*",
"gorriecoe/silverstripe-embed": "*" "gorriecoe/silverstripe-embed": "*",
"gorriecoe/silverstripe-linkfield": "*"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@ -3,8 +3,8 @@
namespace A2nt\CMSNiceties\Widgets; namespace A2nt\CMSNiceties\Widgets;
use Sheadawson\Linkable\Forms\LinkField; use gorriecoe\Link\Models\Link;
use Sheadawson\Linkable\Models\Link; use gorriecoe\LinkField\LinkField;
use SilverStripe\AssetAdmin\Forms\UploadField; use SilverStripe\AssetAdmin\Forms\UploadField;
use SilverStripe\Assets\Image; use SilverStripe\Assets\Image;
use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridField;
@ -42,11 +42,10 @@ class LinksWidget extends Widget
$fields = parent::getCMSFields(); $fields = parent::getCMSFields();
if($this->ID) { if($this->ID) {
$fields->push(GridField::create( $fields->push(LinkField::create(
'Links', 'Links',
'', 'Links',
$this->Links(), $this
GridFieldConfig_RecordEditor::create()
)); ));
}else{ }else{
$fields->push(LiteralField::create( $fields->push(LiteralField::create(