Commit 3eb758fc authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Avoid request in ext:install view

* Use BackendTemplateView and ->render('MyTemplate')
* f:translate with full LLL: keys
* No extbase-only f:form VH usages

Resolves: #96527
Related: #96513
Releases: main
Change-Id: I1679b1755454b05c3cb104ac11d1acf8410cd27d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73005

Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 5e2c6848
......@@ -21,30 +21,23 @@ use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Fluid\View\BackendTemplateView;
/**
* Controller abstract for shared parts of the install tool
* Controller abstract for shared parts of the install tool.
*
* @internal This class is a specific controller implementation and is not considered part of the Public TYPO3 API.
*/
class AbstractController
{
/**
* Helper method to initialize a standalone view instance.
*
* @param ServerRequestInterface $request
* @param string $templatePath
* @return StandaloneView
* @internal param string $template
* Helper method to initialize a view instance.
*/
protected function initializeStandaloneView(ServerRequestInterface $request, string $templatePath): StandaloneView
protected function initializeView(ServerRequestInterface $request): BackendTemplateView
{
$viewRootPath = GeneralUtility::getFileAbsFileName('EXT:install/Resources/Private/');
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->getRequest()->setControllerExtensionName('Install');
$view->setTemplatePathAndFilename($viewRootPath . 'Templates/' . $templatePath);
$view->setLayoutRootPaths([$viewRootPath . 'Layouts/']);
$view->setPartialRootPaths([$viewRootPath . 'Partials/']);
$view = GeneralUtility::makeInstance(BackendTemplateView::class);
$view->setTemplateRootPaths(['EXT:install/Resources/Private/Templates']);
$view->setPartialRootPaths(['EXT:install/Resources/Private/Partials']);
$view->assignMultiple([
'controller' => $request->getQueryParams()['install']['controller'] ?? 'maintenance',
'context' => $request->getQueryParams()['install']['context'] ?? '',
......
......@@ -29,10 +29,9 @@ use TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Http\RedirectResponse;
use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Fluid\View\BackendTemplateView;
use TYPO3\CMS\Install\Service\SessionService;
/**
......@@ -43,6 +42,7 @@ use TYPO3\CMS\Install\Service\SessionService;
* This is a classic backend module that does not interfere with other code
* within the Install Tool, it can be seen as a facade around Install Tool just
* to embed the Install Tool in backend.
*
* @internal This class is a specific controller implementation and is not considered part of the Public TYPO3 API.
*/
class BackendModuleController
......@@ -97,17 +97,11 @@ class BackendModuleController
$flagInvalidPassword = true;
}
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->getTemplatePaths()->setTemplatePathAndFilename(
ExtensionManagementUtility::extPath(
'install',
'Resources/Private/Templates/BackendModule/BackendUserConfirmation.html'
)
);
$view = GeneralUtility::makeInstance(BackendTemplateView::class);
$view->setTemplateRootPaths(['EXT:install/Resources/Private/Templates']);
$view->assignMultiple([
'flagInvalidPassword' => $flagInvalidPassword,
'flagInstallToolPassword' => $flagInstallToolPassword,
'languageFileReference' => 'LLL:EXT:install/Resources/Private/Language/BackendModule.xlf',
'passwordModeUri' => $this->getBackendUserConfirmationUri([
'targetController' => $targetController,
'targetHash' => $targetHash,
......@@ -124,7 +118,7 @@ class BackendModuleController
$moduleTemplate = $this->moduleTemplateFactory->create($request);
$moduleTemplate->setModuleName('tools_tools' . $targetController);
$moduleTemplate->setContent($view->render());
$moduleTemplate->setContent($view->render('BackendModule/BackendUserConfirmation'));
return new HtmlResponse($moduleTemplate->renderContent());
}
......
......@@ -73,10 +73,10 @@ class EnvironmentController extends AbstractController
*/
public function cardsAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Environment/Cards.html');
$view = $this->initializeView($request);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Environment/Cards'),
]);
}
......@@ -88,7 +88,7 @@ class EnvironmentController extends AbstractController
*/
public function systemInformationGetDataAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Environment/SystemInformation.html');
$view = $this->initializeView($request);
$view->assignMultiple([
'systemInformationCgiDetected' => Environment::isRunningOnCgiServer(),
'systemInformationDatabaseConnections' => $this->getDatabaseConnectionInformation(),
......@@ -98,7 +98,7 @@ class EnvironmentController extends AbstractController
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Environment/SystemInformation'),
]);
}
......@@ -110,10 +110,10 @@ class EnvironmentController extends AbstractController
*/
public function phpInfoGetDataAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Environment/PhpInfo.html');
$view = $this->initializeView($request);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Environment/PhpInfo'),
]);
}
......@@ -125,7 +125,7 @@ class EnvironmentController extends AbstractController
*/
public function environmentCheckGetStatusAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Environment/EnvironmentCheck.html');
$view = $this->initializeView($request);
$messageQueue = new FlashMessageQueue('install');
$checkMessages = (new Check())->getStatus();
foreach ($checkMessages as $message) {
......@@ -152,7 +152,7 @@ class EnvironmentController extends AbstractController
'information' => $messageQueue->getAllMessages(FlashMessage::INFO),
'notice' => $messageQueue->getAllMessages(FlashMessage::NOTICE),
],
'html' => $view->render(),
'html' => $view->render('Environment/EnvironmentCheck'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-environmentCheck-execute',
......@@ -170,7 +170,7 @@ class EnvironmentController extends AbstractController
*/
public function folderStructureGetStatusAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Environment/FolderStructure.html');
$view = $this->initializeView($request);
$folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
$structureFacade = $folderStructureFactory->getStructure();
......@@ -205,7 +205,7 @@ class EnvironmentController extends AbstractController
'okStatus' => $okQueue,
'folderStructureFilePermissionStatus' => $permissionCheck->getMaskStatus('fileCreateMask'),
'folderStructureDirectoryPermissionStatus' => $permissionCheck->getMaskStatus('folderCreateMask'),
'html' => $view->render(),
'html' => $view->render('Environment/FolderStructure'),
'buttons' => $buttons,
]);
}
......@@ -234,7 +234,7 @@ class EnvironmentController extends AbstractController
*/
public function mailTestGetDataAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Environment/MailTest.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'mailTestToken' => $formProtection->generateToken('installTool', 'mailTest'),
......@@ -242,7 +242,7 @@ class EnvironmentController extends AbstractController
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Environment/MailTest'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-mailTest-execute',
......@@ -321,7 +321,7 @@ class EnvironmentController extends AbstractController
*/
public function imageProcessingGetDataAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Environment/ImageProcessing.html');
$view = $this->initializeView($request);
$view->assignMultiple([
'imageProcessingProcessor' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor'] === 'GraphicsMagick' ? 'GraphicsMagick' : 'ImageMagick',
'imageProcessingEnabled' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'],
......@@ -334,7 +334,7 @@ class EnvironmentController extends AbstractController
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Environment/ImageProcessing'),
'buttons' => [
[
'btnClass' => 'btn-default disabled t3js-imageProcessing-execute',
......
......@@ -54,7 +54,7 @@ use TYPO3\CMS\Core\Package\FailsafePackageManager;
use TYPO3\CMS\Core\Registry;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Fluid\View\BackendTemplateView;
use TYPO3\CMS\Install\Configuration\FeatureManager;
use TYPO3\CMS\Install\Database\PermissionsCheck;
use TYPO3\CMS\Install\Exception;
......@@ -155,7 +155,7 @@ class InstallerController
if (!Environment::getContext()->isDevelopment()) {
$bust = GeneralUtility::hmac((string)(new Typo3Version()) . Environment::getProjectPath());
}
$view = $this->initializeStandaloneView('Installer/Init.html');
$view = $this->initializeView();
$view->assign('bust', $bust);
$view->assign('packageResourcePaths', [
'backend' => PathUtility::getPublicResourceWebPath('EXT:backend/Resources/Public/'),
......@@ -163,7 +163,7 @@ class InstallerController
'install' => PathUtility::getPublicResourceWebPath('EXT:install/Resources/Public/'),
]);
return new HtmlResponse(
$view->render(),
$view->render('Installer/Init'),
200,
[
'Cache-Control' => 'no-cache, must-revalidate',
......@@ -179,10 +179,10 @@ class InstallerController
*/
public function mainLayoutAction(): ResponseInterface
{
$view = $this->initializeStandaloneView('Installer/MainLayout.html');
$view = $this->initializeView();
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Installer/MainLayout'),
]);
}
......@@ -193,10 +193,10 @@ class InstallerController
*/
public function showInstallerNotAvailableAction(): ResponseInterface
{
$view = $this->initializeStandaloneView('Installer/ShowInstallerNotAvailable.html');
$view = $this->initializeView();
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Installer/ShowInstallerNotAvailable'),
]);
}
......@@ -219,7 +219,7 @@ class InstallerController
*/
public function showEnvironmentAndFoldersAction(): ResponseInterface
{
$view = $this->initializeStandaloneView('Installer/ShowEnvironmentAndFolders.html');
$view = $this->initializeView();
$systemCheckMessageQueue = new FlashMessageQueue('install');
$checkMessages = (new Check())->getStatus();
foreach ($checkMessages as $message) {
......@@ -234,7 +234,7 @@ class InstallerController
$structureMessageQueue = $structureFacade->getStatus();
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Installer/ShowEnvironmentAndFolders'),
'environmentStatusErrors' => $systemCheckMessageQueue->getAllMessages(FlashMessage::ERROR),
'environmentStatusWarnings' => $systemCheckMessageQueue->getAllMessages(FlashMessage::WARNING),
'structureErrors' => $structureMessageQueue->getAllMessages(FlashMessage::ERROR),
......@@ -360,7 +360,7 @@ class InstallerController
*/
public function showDatabaseConnectAction(): ResponseInterface
{
$view = $this->initializeStandaloneView('Installer/ShowDatabaseConnect.html');
$view = $this->initializeView();
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$hasAtLeastOneOption = false;
$activeAvailableOption = '';
......@@ -474,7 +474,7 @@ class InstallerController
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Installer/ShowDatabaseConnect'),
]);
}
......@@ -666,7 +666,7 @@ class InstallerController
*/
public function showDatabaseSelectAction(): ResponseInterface
{
$view = $this->initializeStandaloneView('Installer/ShowDatabaseSelect.html');
$view = $this->initializeView();
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$errors = [];
try {
......@@ -681,7 +681,7 @@ class InstallerController
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Installer/ShowDatabaseSelect'),
]);
}
......@@ -890,7 +890,7 @@ class InstallerController
*/
public function showDatabaseDataAction(): ResponseInterface
{
$view = $this->initializeStandaloneView('Installer/ShowDatabaseData.html');
$view = $this->initializeView();
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'siteName' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
......@@ -898,7 +898,7 @@ class InstallerController
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Installer/ShowDatabaseData'),
]);
}
......@@ -994,7 +994,7 @@ class InstallerController
*/
public function showDefaultConfigurationAction(): ResponseInterface
{
$view = $this->initializeStandaloneView('Installer/ShowDefaultConfiguration.html');
$view = $this->initializeView();
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'composerMode' => Environment::isComposerMode(),
......@@ -1002,7 +1002,7 @@ class InstallerController
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Installer/ShowDefaultConfiguration'),
]);
}
......@@ -1131,26 +1131,16 @@ For each website you need a TypoScript template on the main page of your website
/**
* Helper method to initialize a standalone view instance.
*
* @param string $templatePath
* @return StandaloneView
* @internal param string $template
*/
protected function initializeStandaloneView(string $templatePath): StandaloneView
protected function initializeView(): BackendTemplateView
{
$viewRootPath = GeneralUtility::getFileAbsFileName('EXT:install/Resources/Private/');
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->getRequest()->setControllerExtensionName('Install');
$view->setTemplatePathAndFilename($viewRootPath . 'Templates/' . $templatePath);
$view->setLayoutRootPaths([$viewRootPath . 'Layouts/']);
$view->setPartialRootPaths([$viewRootPath . 'Partials/']);
$view = GeneralUtility::makeInstance(BackendTemplateView::class);
$view->setTemplateRootPaths(['EXT:install/Resources/Private/Templates']);
return $view;
}
/**
* Test connection with given credentials and return exception message if exception thrown
*
* @return bool
*/
protected function isDatabaseConnectSuccessful(): bool
{
......
......@@ -64,7 +64,7 @@ class LayoutController extends AbstractController
if (!Environment::getContext()->isDevelopment()) {
$bust = GeneralUtility::hmac((string)(new Typo3Version()) . Environment::getProjectPath());
}
$view = $this->initializeStandaloneView($request, 'Layout/Init.html');
$view = $this->initializeView($request);
$view->assignMultiple([
// time is used as cache bust for js and css resources
'bust' => $bust,
......@@ -76,7 +76,7 @@ class LayoutController extends AbstractController
],
]);
return new HtmlResponse(
$view->render(),
$view->render('Layout/Init'),
200,
[
'Cache-Control' => 'no-cache, must-revalidate',
......@@ -95,11 +95,11 @@ class LayoutController extends AbstractController
*/
public function mainLayoutAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Layout/MainLayout.html');
$view = $this->initializeView($request);
$view->assign('moduleName', 'tools_tools' . ($request->getQueryParams()['install']['module'] ?? 'layout'));
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Layout/MainLayout'),
]);
}
......
......@@ -38,10 +38,10 @@ class LoginController extends AbstractController
*/
public function showEnableInstallToolFileAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Login/ShowEnableInstallToolFile.html');
$view = $this->initializeView($request);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Login/ShowEnableInstallToolFile'),
]);
}
......@@ -54,7 +54,7 @@ class LoginController extends AbstractController
public function showLoginAction(ServerRequestInterface $request): ResponseInterface
{
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view = $this->initializeStandaloneView($request, 'Login/ShowLogin.html');
$view = $this->initializeView($request);
$view->assignMultiple([
'siteName' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
'loginToken' => $formProtection->generateToken('installTool', 'login'),
......@@ -62,7 +62,7 @@ class LoginController extends AbstractController
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Login/ShowLogin'),
]);
}
}
......@@ -94,10 +94,10 @@ class MaintenanceController extends AbstractController
*/
public function cardsAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Maintenance/Cards.html');
$view = $this->initializeView($request);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Maintenance/Cards'),
]);
}
......@@ -130,7 +130,7 @@ class MaintenanceController extends AbstractController
$container = $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
$typo3tempFileService = $container->get(Typo3tempFileService::class);
$view = $this->initializeStandaloneView($request, 'Maintenance/ClearTypo3tempFiles.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'clearTypo3tempFilesToken' => $formProtection->generateToken('installTool', 'clearTypo3tempFiles'),
......@@ -139,7 +139,7 @@ class MaintenanceController extends AbstractController
[
'success' => true,
'stats' => $typo3tempFileService->getDirectoryStatistics(),
'html' => $view->render(),
'html' => $view->render('Maintenance/ClearTypo3tempFiles'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-clearTypo3temp-stats',
......@@ -226,14 +226,14 @@ class MaintenanceController extends AbstractController
*/
public function databaseAnalyzerAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Maintenance/DatabaseAnalyzer.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'databaseAnalyzerExecuteToken' => $formProtection->generateToken('installTool', 'databaseAnalyzerExecute'),
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Maintenance/DatabaseAnalyzer'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-databaseAnalyzer-analyze',
......@@ -452,7 +452,7 @@ class MaintenanceController extends AbstractController
*/
public function clearTablesStatsAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Maintenance/ClearTables.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'clearTablesClearToken' => $formProtection->generateToken('installTool', 'clearTablesClear'),
......@@ -460,7 +460,7 @@ class MaintenanceController extends AbstractController
return new JsonResponse([
'success' => true,
'stats' => (new ClearTableService())->getTableStatistics(),
'html' => $view->render(),
'html' => $view->render('Maintenance/ClearTables'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-clearTables-stats',
......@@ -503,14 +503,14 @@ class MaintenanceController extends AbstractController
*/
public function createAdminGetDataAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Maintenance/CreateAdmin.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'createAdminToken' => $formProtection->generateToken('installTool', 'createAdmin'),
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Maintenance/CreateAdmin'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-createAdmin-create',
......@@ -623,7 +623,7 @@ class MaintenanceController extends AbstractController
*/
public function languagePacksGetDataAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Maintenance/LanguagePacks.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'languagePacksActivateLanguageToken' => $formProtection->generateToken('installTool', 'languagePacksActivateLanguage'),
......@@ -641,7 +641,7 @@ class MaintenanceController extends AbstractController
'extensions' => $extensions,
'activeLanguages' => $languagePackService->getActiveLanguages(),
'activeExtensions' => array_column($extensions, 'key'),
'html' => $view->render(),
'html' => $view->render('Maintenance/LanguagePacks'),
]);
}
......
......@@ -79,10 +79,10 @@ class SettingsController extends AbstractController
*/
public function cardsAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Settings/Cards.html');
$view = $this->initializeView($request);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Settings/Cards'),
]);
}
......@@ -94,14 +94,14 @@ class SettingsController extends AbstractController
*/
public function changeInstallToolPasswordGetDataAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Settings/ChangeInstallToolPassword.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'changeInstallToolPasswordToken' => $formProtection->generateToken('installTool', 'changeInstallToolPassword'),
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Settings/ChangeInstallToolPassword'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-changeInstallToolPassword-change',
......@@ -161,7 +161,7 @@ class SettingsController extends AbstractController
*/
public function systemMaintainerGetListAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Settings/SystemMaintainer.html');
$view = $this->initializeView($request);
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view->assignMultiple([
'systemMaintainerWriteToken' => $formProtection->generateToken('installTool', 'systemMaintainerWrite'),
......@@ -199,7 +199,7 @@ class SettingsController extends AbstractController
return new JsonResponse([
'success' => true,
'users' => $users,
'html' => $view->render(),
'html' => $view->render('Settings/SystemMaintainer'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-systemMaintainer-write',
......@@ -280,14 +280,14 @@ class SettingsController extends AbstractController
{
$localConfigurationValueService = new LocalConfigurationValueService();
$formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
$view = $this->initializeStandaloneView($request, 'Settings/LocalConfigurationGetContent.html');
$view = $this->initializeView($request);
$view->assignMultiple([
'localConfigurationWriteToken' => $formProtection->generateToken('installTool', 'localConfigurationWrite'),
'localConfigurationData' => $localConfigurationValueService->getCurrentConfigurationData(),
]);
return new JsonResponse([
'success' => true,
'html' => $view->render(),
'html' => $view->render('Settings/LocalConfigurationGetContent'),
'buttons' => [
[
'btnClass' => 'btn-default t3js-localConfiguration-write',
......@@ -340,7 +340,7 @@ class SettingsController extends AbstractController
*/
public function presetsGetContentAction(ServerRequestInterface $request): ResponseInterface