mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
FIX: SS5 outdated element
This commit is contained in:
parent
9f2a14afd2
commit
cec20eebf9
@ -142,16 +142,18 @@ class SiteConfigExtension extends DataExtension
|
||||
|
||||
$fields->addFieldsToTab('Root.Maps', $addrFields);
|
||||
|
||||
if (MapboxField::getAccessToken()) {
|
||||
$fields->addFieldsToTab('Root.Maps', [
|
||||
//TextField::create('MapAPIKey'),
|
||||
TextField::create('MapZoom'),
|
||||
MapboxField::create('Map', 'Choose a location', 'Latitude', 'Longitude'),
|
||||
]);
|
||||
} else {
|
||||
$fields->addFieldsToTab('Root.Maps', [
|
||||
LiteralField::create('MapNotice', '<p class="alert alert-info">No Map API keys specified.</p>')
|
||||
]);
|
||||
if (\class_exists(MapboxField::class)) {
|
||||
if (MapboxField::getAccessToken()) {
|
||||
$fields->addFieldsToTab('Root.Maps', [
|
||||
//TextField::create('MapAPIKey'),
|
||||
TextField::create('MapZoom'),
|
||||
MapboxField::create('Map', 'Choose a location', 'Latitude', 'Longitude'),
|
||||
]);
|
||||
} else {
|
||||
$fields->addFieldsToTab('Root.Maps', [
|
||||
LiteralField::create('MapNotice', '<p class="alert alert-info">No Map API keys specified.</p>')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/*GoogleMapField::create(
|
||||
|
Loading…
Reference in New Issue
Block a user