FIX: Replace link field

This commit is contained in:
Tony Air 2022-07-02 18:01:21 +02:00
parent bab6709e68
commit ad44f6c43e
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ class ElementImageWidget extends DataExtension
$fields->insertBefore(
'Image',
LinkField::create('ImageLinkID', 'Link')
LinkField::create('ImageLinkID', 'Link', $this->owner)
);
$this->owner->ImageHeight = $this->getHeight();

View File

@ -90,13 +90,13 @@ class MapPin extends DataObject
$fields->replaceField(
'PhoneNumberID',
LinkField::create('PhoneNumberID', 'Phone Number')
LinkField::create('PhoneNumberID', 'Phone Number', $this)
->setAllowedTypes(['Phone'])
);
$fields->replaceField(
'FaxID',
LinkField::create('FaxID', 'FAX')
LinkField::create('FaxID', 'FAX', $this)
->setAllowedTypes(['Phone'])
);
$fields->removeByName(['Map', 'LatLngOverride', 'Lng','Lat']);