Commit ca7887e2 authored by carstenG's avatar carstenG Committed by itamair
Browse files

Issue #2979287 by carstenG: Notice on node display form

parent ecd26225
......@@ -256,6 +256,7 @@ class GeofieldGoogleMapFormatter extends FormatterBase implements ContainerFacto
],
];
$file_upload_help = $this->markerIcon->getFileUploadHelp();
$fid = (integer) !empty($settings['map_marker_and_infowindow']['icon_file_wrapper']['icon_file']['fids']) ? $settings['map_marker_and_infowindow']['icon_file_wrapper']['icon_file']['fids'] : NULL;
$elements['map_marker_and_infowindow']['icon_file_wrapper'] = [
'#type' => 'container',
......@@ -264,7 +265,7 @@ class GeofieldGoogleMapFormatter extends FormatterBase implements ContainerFacto
],
'description' => [
'#markup' => Markup::create($this->t('The chosen icon file will be used as Marker for this content @file_upload_help', [
'@file_upload_help' => $this->renderer->renderPlain($this->markerIcon->getFileUploadHelp()),
'@file_upload_help' => $this->renderer->renderPlain($file_upload_help),
])),
],
'icon_file' => $this->markerIcon->getIconFileManagedElement($fid),
......
......@@ -36,13 +36,14 @@ class CustomIconThemer extends MapThemerBase {
// Get the existing (Default) Element settings.
$default_element = $this->getDefaultThemerElement($defaults);
$file_upload_help = $this->markerIcon->getFileUploadHelp();
$fid = (integer) !empty($default_element['icon_file']['fids']) ? $default_element['icon_file']['fids'] : NULL;
$element = [
'#markup' => Markup::create($this->t('<label>Custom Icon Image File</label>')),
'#type' => 'container',
'description' => [
'#markup' => Markup::create($this->t('The chosen icon file will be used as Marker for all Geofield Map features @file_upload_help', [
'@file_upload_help' => $this->renderer->renderPlain($this->markerIcon->getFileUploadHelp()),
'@file_upload_help' => $this->renderer->renderPlain($file_upload_help),
])),
],
'icon_file' => $this->markerIcon->getIconFileManagedElement($fid[0]),
......
......@@ -124,16 +124,19 @@ class EntityTypeThemer extends MapThemerBase {
],
];
$label_alias_upload_help = $this->getLabelAliasHelp();
$file_upload_help = $this->markerIcon->getFileUploadHelp();
$element = [
'#type' => 'table',
'#header' => [
$this->t('@entity type Type/Bundle', ['@entity type' => $entity_type]),
$this->t('Weight'),
Markup::create($this->t('Label Alias @description', [
'@description' => $this->renderer->renderPlain($this->getLabelAliasHelp()),
'@description' => $this->renderer->renderPlain($label_alias_upload_help),
])),
Markup::create($this->t('Marker Icon @file_upload_help', [
'@file_upload_help' => $this->renderer->renderPlain($this->markerIcon->getFileUploadHelp()),
'@file_upload_help' => $this->renderer->renderPlain($file_upload_help),
])),
$this->t('Icon Image Style'),
$this->t('Exclude from Legend'),
......
......@@ -219,6 +219,9 @@ class TaxonomyTermThemer extends MapThemerBase {
],
];
$label_alias_upload_help = $this->getLabelAliasHelp();
$file_upload_help = $this->markerIcon->getFileUploadHelp();
$element['fields'][$k] = [
'#type' => 'container',
'terms' => [
......@@ -227,10 +230,10 @@ class TaxonomyTermThemer extends MapThemerBase {
$this->t('Taxonomy term'),
$this->t('Weight'),
Markup::create($this->t('Term Alias @description', [
'@description' => $this->renderer->renderPlain($this->getLabelAliasHelp()),
'@description' => $this->renderer->renderPlain($label_alias_upload_help),
])),
Markup::create($this->t('Marker Icon @file_upload_help', [
'@file_upload_help' => $this->renderer->renderPlain($this->markerIcon->getFileUploadHelp()),
'@file_upload_help' => $this->renderer->renderPlain($file_upload_help),
])),
$this->t('Icon Image Style'),
$this->t('Hide from Legend'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment