N°3556 - Fix JS dict. entries not available in SetupPage anymore

This commit is contained in:
Molkobain
2021-09-23 18:35:46 +02:00
parent e93c0123aa
commit fedc3d4d76
2 changed files with 2 additions and 4 deletions

View File

@@ -49,9 +49,6 @@ class SetupPage extends NiceWebPage
$this->LoadTheme();
$this->add_saas("css/setup.scss");
// Note: JS dict. entries cannot be added to the setup page as it does not support them well. Install from scratch is mot likely to crash (especially with build packages) as it gonna try to load the english dictionary from env-production which doesn't exists yet
$this->bAddJSDict = false;
}
/**

View File

@@ -215,7 +215,8 @@ class WebPage implements Page
$this->aBlockParams = [];
$this->bHasCollapsibleSection = false;
$this->bPrintable = $bPrintable;
$this->bAddJSDict = true;
// Note: JS dict. entries cannot be added to a page if current environment and config file aren't available yet.
$this->bAddJSDict = class_exists('\Dict') && file_exists(utils::GetConfigFilePath());
$this->oContentLayout = new UIContentBlock();
$this->SetTemplateRelPath(static::DEFAULT_PAGE_TEMPLATE_REL_PATH);