mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 17:05:54 +02:00
FIX: Replace link field
This commit is contained in:
parent
bab6709e68
commit
ad44f6c43e
@ -71,7 +71,7 @@ class ElementImageWidget extends DataExtension
|
|||||||
|
|
||||||
$fields->insertBefore(
|
$fields->insertBefore(
|
||||||
'Image',
|
'Image',
|
||||||
LinkField::create('ImageLinkID', 'Link')
|
LinkField::create('ImageLinkID', 'Link', $this->owner)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->owner->ImageHeight = $this->getHeight();
|
$this->owner->ImageHeight = $this->getHeight();
|
||||||
|
@ -90,13 +90,13 @@ class MapPin extends DataObject
|
|||||||
|
|
||||||
$fields->replaceField(
|
$fields->replaceField(
|
||||||
'PhoneNumberID',
|
'PhoneNumberID',
|
||||||
LinkField::create('PhoneNumberID', 'Phone Number')
|
LinkField::create('PhoneNumberID', 'Phone Number', $this)
|
||||||
->setAllowedTypes(['Phone'])
|
->setAllowedTypes(['Phone'])
|
||||||
);
|
);
|
||||||
|
|
||||||
$fields->replaceField(
|
$fields->replaceField(
|
||||||
'FaxID',
|
'FaxID',
|
||||||
LinkField::create('FaxID', 'FAX')
|
LinkField::create('FaxID', 'FAX', $this)
|
||||||
->setAllowedTypes(['Phone'])
|
->setAllowedTypes(['Phone'])
|
||||||
);
|
);
|
||||||
$fields->removeByName(['Map', 'LatLngOverride', 'Lng','Lat']);
|
$fields->removeByName(['Map', 'LatLngOverride', 'Lng','Lat']);
|
||||||
|
Loading…
Reference in New Issue
Block a user