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( $fields->insertBefore(
'Image', 'Image',
LinkField::create('ImageLinkID', 'Link') LinkField::create('ImageLinkID', 'Link', $this->owner)
); );
$this->owner->ImageHeight = $this->getHeight(); $this->owner->ImageHeight = $this->getHeight();

View File

@ -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']);