diff --git a/application/views/themeOptions/options_core.php b/application/views/themeOptions/options_core.php index 1f5f9890638..ab81c154acf 100644 --- a/application/views/themeOptions/options_core.php +++ b/application/views/themeOptions/options_core.php @@ -2,17 +2,13 @@ $bInherit = (!empty($aTemplateConfiguration['sid']) || !empty($aTemplateConfiguration['gsid'])); - $dropdown_options['font'] = ($bInherit ? '' : ''); - // background file $backgroundImageFile = ''; -$backgroundfileOptionsInherit = ''; $backgroundfileInheritPreview = ''; -$backgroundfileInheritFilename = ''; $optgroup = ''; foreach ($aTemplateConfiguration['imageFileList'] as $image) { if ($image['group'] != $optgroup) { @@ -24,10 +20,11 @@ } $backgroundImageFile .= ''; - if (isset($oParentOptions['backgroundimagefile']) && $oParentOptions['backgroundimagefile'] == $image['filepath']) { - $backgroundfileInheritPreview = $backgroundfileInheritPreview . $image['preview']; - $backgroundfileInheritFilename = $backgroundfileInheritFilename . $image['filename']; + + if (isset($oParentOptions['backgroundimagefile']) && ($oParentOptions['backgroundimagefile'] == $image['filepath'] || $oParentOptions['backgroundimagefile'] == $image['filepathOptions'])) { + $backgroundfileInheritPreview = $image['preview']; } + $backgroundImageFile .= ''; } @@ -35,9 +32,7 @@ // brand logo file $brandlogo = ''; -$logofileOptionsInherit = ''; $logofileInheritPreview = ''; -$logofileInheritFilename = ''; $optgroup = ''; foreach ($aTemplateConfiguration['imageFileList'] as $image) { if ($image['group'] != $optgroup) { @@ -49,10 +44,11 @@ } $brandlogo .= ''; - if ($oParentOptions['brandlogo'] == $image['filepath']) { - $logofileInheritPreview = $logofileInheritPreview . $image['preview']; - $logofileInheritFilename = $logofileInheritFilename . $image['filename']; + + if (isset($oParentOptions['brandlogofile']) && ($oParentOptions['brandlogofile'] == $image['filepath'] || $oParentOptions['brandlogofile'] == $image['filepathOptions'])) { + $logofileInheritPreview = $image['preview']; } + $brandlogo .= ''; } @@ -101,7 +97,6 @@ echo ''; } - foreach ($aOptionAttributes['optionAttributes'] as $attributeKey => $attribute) { $sParentOption = array_key_exists($attributeKey, $oParentOptions) ? $oParentOptions[$attributeKey] : ''; if ($attributeKey === 'ajaxmode') { @@ -168,17 +163,34 @@ // TODO: $aParentOptions is not loaded properly, it seems. $sParentOption = 'N/A'; } + $classes = [ + 'form-select', + 'selector_option_value_field', + 'selector_radio_childfield', + ]; + if ($category === 'Images') { + $classes[] = 'selector_image_selector'; + } + $classValue = implode(' ', $classes); echo '