mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
FIX: Replace link field
This commit is contained in:
parent
b95de9a58f
commit
936bca73e9
@ -17,7 +17,8 @@
|
||||
"a2nt/silverstripe-elemental-basics": "*",
|
||||
"silverstripe/widgets": "*",
|
||||
"drmartingonzo/ss-tinymce-charcount": "*",
|
||||
"gorriecoe/silverstripe-embed": "*"
|
||||
"gorriecoe/silverstripe-embed": "*",
|
||||
"gorriecoe/silverstripe-linkfield": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
namespace A2nt\CMSNiceties\Widgets;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use gorriecoe\Link\Models\Link;
|
||||
use gorriecoe\LinkField\LinkField;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
@ -42,11 +42,10 @@ class LinksWidget extends Widget
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
if($this->ID) {
|
||||
$fields->push(GridField::create(
|
||||
$fields->push(LinkField::create(
|
||||
'Links',
|
||||
'',
|
||||
$this->Links(),
|
||||
GridFieldConfig_RecordEditor::create()
|
||||
'Links',
|
||||
$this
|
||||
));
|
||||
}else{
|
||||
$fields->push(LiteralField::create(
|
||||
|
Loading…
Reference in New Issue
Block a user