Add support for tab icons in theme customization (#4464)

Fixes #4131. Credit to @Samuell1
This commit is contained in:
Samuell 2019-07-22 07:45:31 +02:00 committed by Luke Towers
parent c21c22e1ba
commit 36c69a063b
1 changed files with 3 additions and 14 deletions

View File

@ -89,23 +89,12 @@ class ThemeOptions extends Controller
/**
* Add form fields defined in theme.yaml
*/
public function formExtendFields($form)
public function formExtendFieldsBefore($form)
{
$model = $form->model;
$theme = $this->findThemeObject($model->theme);
$config = $theme->getFormConfig();
if ($fields = array_get($config, 'fields')) {
$form->addFields($fields);
}
if ($fields = array_get($config, 'tabs.fields')) {
$form->addTabFields($fields);
}
if ($fields = array_get($config, 'secondaryTabs.fields')) {
$form->addSecondaryTabFields($fields);
}
$form->config = $this->mergeConfig($form->config, $theme->getFormConfig());
$form->init();
}
//