mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 09:05:46 +00:00
FIX: Replace link field
This commit is contained in:
parent
b95de9a58f
commit
936bca73e9
@ -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": {
|
||||||
|
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user