Commit a560b9b0 authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Benni Mack

[TASK] Streamline moduleName handling

 * Avoid custom moduleName in EXT:form and add a new moduleClass
   property for the purpose of custom controller styling
 * Use correct module name in view module (removing the custom one)
 * Advertise data-module-name body attribute in installtool modules

Releases: master
Resolves: #93907
Related: #93885
Change-Id: I662fa2131c5f898d5a327a9eaefff7202f6a9646
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68763Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 4a1204bb
......@@ -1176,7 +1176,7 @@ body {
//
// Module
//
.module[data-module-name="web_FormFormbuilder_FormEditor"] {
.module.web_FormFormbuilder_FormEditor {
overflow: hidden;
.module-body,
......
......@@ -101,7 +101,7 @@ class Router {
}
}
public getUrl(action?: string, controller?: string): string {
public getUrl(action?: string, controller?: string, query?: string): string {
const context = $(this.selectorBody).data('context');
let url = location.href;
url = url.replace(location.search, '');
......@@ -115,6 +115,9 @@ class Router {
if (action !== undefined) {
url = url + '&install[action]=' + action;
}
if (query !== undefined) {
url = url + '&' + query;
}
return url;
}
......@@ -183,8 +186,9 @@ class Router {
public loadMainLayout(): void {
const $outputContainer = $(this.selectorBody);
const controller = $outputContainer.data('controller');
this.updateLoadingInfo('Loading main layout');
(new AjaxRequest(this.getUrl('mainLayout', 'layout')))
(new AjaxRequest(this.getUrl('mainLayout', 'layout', 'install[module]=' + controller)))
.get({cache: 'no-cache'})
.then(
async (response: AjaxResponse): Promise<any> => {
......@@ -193,7 +197,6 @@ class Router {
$outputContainer.empty().append(data.html);
// Mark main module as active in standalone
if ($(this.selectorBody).data('context') !== 'backend') {
const controller = $outputContainer.data('controller');
$outputContainer.find('.t3js-modulemenu-action[data-controller="' + controller + '"]').addClass('modulemenu-action-active');
}
this.loadCards();
......
......@@ -132,6 +132,13 @@ class ModuleTemplate
*/
protected $moduleName = '';
/**
* Module Class
*
* @var string
*/
protected $moduleClass = '';
/**
* Title Tag
*
......@@ -380,6 +387,9 @@ class ModuleTemplate
if ($this->moduleName) {
$this->view->assign('moduleName', $this->moduleName);
}
if ($this->moduleClass) {
$this->view->assign('moduleClass', $this->moduleClass);
}
$this->view->assign('uiBlock', $this->uiBlock);
$this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());
$this->pageRenderer->addBodyContent($this->bodyTag . $this->view->render());
......@@ -429,6 +439,18 @@ class ModuleTemplate
return $this;
}
/**
* Sets the ModuleClass
*
* @param string $moduleClass Class of the module
* @return self
*/
public function setModuleClass($moduleClass): self
{
$this->moduleClass = $moduleClass;
return $this;
}
/**
* Generates the Menu for things like Web->Info
*
......
......@@ -55,6 +55,17 @@ class ModuleLayoutViewHelper extends AbstractViewHelper
*/
protected $escapeOutput = false;
/**
* Initialize arguments.
*
* @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('name', 'string', 'Name of the module, defaults to the current plugin name, if available', false);
}
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
......@@ -76,6 +87,9 @@ class ModuleLayoutViewHelper extends AbstractViewHelper
$moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
$moduleTemplate->setFlashMessageQueue($flashMessageQueue);
if (($arguments['name'] ?? null) !== null) {
$moduleTemplate->setModuleName($arguments['name']);
}
$viewHelperVariableContainer->add(self::class, ModuleTemplate::class, $moduleTemplate);
$moduleTemplate->setContent($renderChildrenClosure());
......
<div class="module" data-module-id="{moduleId}" data-module-name="{moduleName}">
<div class="module {f:if(condition: moduleClass, then: moduleClass)}" data-module-id="{moduleId}" data-module-name="{moduleName}">
<f:if condition="{formTag}">
<f:then>
<f:format.raw>{formTag}</f:format.raw>
......
......@@ -72,7 +72,7 @@ class FormEditorController extends AbstractBackendController
public function indexAction(string $formPersistenceIdentifier, string $prototypeName = null)
{
$this->registerDocheaderButtons();
$this->view->getModuleTemplate()->setModuleName($this->request->getPluginName() . '_' . $this->request->getControllerName());
$this->view->getModuleTemplate()->setModuleClass($this->request->getPluginName() . '_' . $this->request->getControllerName());
$this->view->getModuleTemplate()->setFlashMessageQueue($this->getFlashMessageQueue());
if (!$this->formPersistenceManager->isAllowedPersistencePath($formPersistenceIdentifier)) {
......
......@@ -75,7 +75,7 @@ class FormManagerController extends AbstractBackendController
public function indexAction()
{
$this->registerDocheaderButtons();
$this->view->getModuleTemplate()->setModuleName($this->request->getPluginName() . '_' . $this->request->getControllerName());
$this->view->getModuleTemplate()->setModuleClass($this->request->getPluginName() . '_' . $this->request->getControllerName());
$this->view->getModuleTemplate()->setFlashMessageQueue($this->getFlashMessageQueue());
$this->view->assign('forms', $this->getAvailableFormDefinitions());
......
......@@ -119,6 +119,7 @@ class BackendModuleController
'flags' => $flags | self::FLAG_CONFIRMATION_REQUEST,
]),
'cancelUri' => '',
'targetController' => $targetController,
]);
return new HtmlResponse($view->render());
}
......
......@@ -90,6 +90,7 @@ class LayoutController extends AbstractController
public function mainLayoutAction(ServerRequestInterface $request): ResponseInterface
{
$view = $this->initializeStandaloneView($request, 'Layout/MainLayout.html');
$view->assign('moduleName', 'tools_tools' . ($request->getQueryParams()['install']['module'] ?? 'layout'));
return new JsonResponse([
'success' => true,
'html' => $view->render(),
......
......@@ -5,7 +5,7 @@
<f:be.pageRenderer includeRequireJsModules="{0: 'TYPO3/CMS/Install/BackendUserConfirmation'}" />
<be:moduleLayout>
<be:moduleLayout name="tools_tools{targetController}">
<div class="modal-backdrop in"></div>
<div class="modal modal-severity-warning modal-size-small" tabindex="-1" role="dialog" style="display: block;">
<div class="modal-dialog" role="document">
......
......@@ -2,7 +2,7 @@
<f:if condition="{context} == 'backend'">
<f:then>
<div class="module" data-module-id="" data-module-name="">
<div class="module" data-module-id="" data-module-name="{moduleName}">
<div class="module-docheader t3js-module-docheader">
<div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation row">
<div class="module-docheader-bar-column-left col-12 col-sm-4 col-md-3">
......
......@@ -10,4 +10,4 @@
*
* The TYPO3 project - inspiring people to share!
*/
var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};define(["require","exports","jquery","TYPO3/CMS/Core/Ajax/AjaxRequest","TYPO3/CMS/Backend/Icons","TYPO3/CMS/Backend/Modal","./Renderable/InfoBox","./Renderable/ProgressBar","./Renderable/Severity"],(function(e,t,a,n,o,l,i,s,c){"use strict";a=__importDefault(a);return new class{constructor(){this.selectorBody=".t3js-body",this.selectorMainContent=".t3js-module-body"}initialize(){this.registerInstallToolRoutes(),a.default(document).on("click",".t3js-login-lockInstallTool",e=>{e.preventDefault(),this.logout()}),a.default(document).on("click",".t3js-login-login",e=>{e.preventDefault(),this.login()}),a.default(document).on("keydown","#t3-install-form-password",e=>{"Enter"===e.key&&(e.preventDefault(),a.default(".t3js-login-login").trigger("click"))}),a.default(document).on("click",".t3js-modulemenu-action",e=>{e.preventDefault();const t=a.default(e.currentTarget);window.location.href=t.data("link")}),a.default(document).on("click",".card .btn",t=>{t.preventDefault();const n=a.default(t.currentTarget),i=n.data("require"),s=n.data("inline");if(void 0!==s&&1===parseInt(s,10))e([i],e=>{e.initialize(n)});else{const t=n.closest(".card").find(".card-title").html(),s=n.data("modalSize")||l.sizes.large,c=l.advanced({type:l.types.default,title:t,size:s,content:a.default('<div class="modal-loading">'),additionalCssClasses:["install-tool-modal"],callback:t=>{e([i],e=>{e.initialize(t)})}});o.getIcon("spinner-circle",o.sizes.default,null,null,o.markupIdentifiers.inline).then(e=>{c.find(".modal-loading").append(e)})}});"backend"===a.default(this.selectorBody).data("context")?this.executeSilentConfigurationUpdate():this.preAccessCheck()}registerInstallToolRoutes(){void 0===TYPO3.settings&&(TYPO3.settings={ajaxUrls:{icons:window.location.origin+window.location.pathname+"?install[controller]=icon&install[action]=getIcon",icons_cache:window.location.origin+window.location.pathname+"?install[controller]=icon&install[action]=getCacheIdentifier"}})}getUrl(e,t){const n=a.default(this.selectorBody).data("context");let o=location.href;return o=o.replace(location.search,""),void 0===t&&(t=a.default(this.selectorBody).data("controller")),o=o+"?install[controller]="+t,void 0!==n&&""!==n&&(o=o+"&install[context]="+n),void 0!==e&&(o=o+"&install[action]="+e),o}executeSilentConfigurationUpdate(){this.updateLoadingInfo("Checking session and executing silent configuration update"),new n(this.getUrl("executeSilentConfigurationUpdate","layout")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.executeSilentTemplateFileUpdate():this.executeSilentConfigurationUpdate()},e=>{this.handleAjaxError(e)})}executeSilentTemplateFileUpdate(){this.updateLoadingInfo("Checking session and executing silent template file update"),new n(this.getUrl("executeSilentTemplateFileUpdate","layout")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.executeSilentExtensionConfigurationSynchronization():this.executeSilentTemplateFileUpdate()},e=>{this.handleAjaxError(e)})}executeSilentExtensionConfigurationSynchronization(){const e=a.default(this.selectorBody);this.updateLoadingInfo("Executing silent extension configuration synchronization"),new n(this.getUrl("executeSilentExtensionConfigurationSynchronization","layout")).get({cache:"no-cache"}).then(async t=>{if(!0===(await t.resolve()).success)this.loadMainLayout();else{const t=i.render(c.error,"Something went wrong","");e.empty().append(t)}},e=>{this.handleAjaxError(e)})}loadMainLayout(){const e=a.default(this.selectorBody);this.updateLoadingInfo("Loading main layout"),new n(this.getUrl("mainLayout","layout")).get({cache:"no-cache"}).then(async t=>{const n=await t.resolve();if(!0===n.success&&"undefined"!==n.html&&n.html.length>0){if(e.empty().append(n.html),"backend"!==a.default(this.selectorBody).data("context")){const t=e.data("controller");e.find('.t3js-modulemenu-action[data-controller="'+t+'"]').addClass("modulemenu-action-active")}this.loadCards()}else{const t=i.render(c.error,"Something went wrong","");e.empty().append(t)}},e=>{this.handleAjaxError(e)})}async handleAjaxError(e,t){let n;if(403===e.response.status){"backend"===a.default(this.selectorBody).data("context")?(n=i.render(c.error,"The install tool session expired. Please reload the backend and try again."),a.default(this.selectorBody).empty().append(n)):this.checkEnableInstallToolFile()}else{const o=this.getUrl(void 0,"upgrade");n=a.default('<div class="t3js-infobox callout callout-sm callout-danger"><div class="callout-body"><p>Something went wrong. Please use <b><a href="'+o+'">Check for broken extensions</a></b> to see if a loaded extension breaks this part of the install tool and unload it.</p><p>The box below may additionally reveal further details on what went wrong depending on your debug settings. It may help to temporarily switch to debug mode using <b>Settings > Configuration Presets > Debug settings.</b></p><p>If this error happens at an early state and no full exception back trace is shown, it may also help to manually increase debugging output in <code>typo3conf/LocalConfiguration.php</code>:<code>[\'BE\'][\'debug\'] => true</code>, <code>[\'SYS\'][\'devIPmask\'] => \'*\'</code>, <code>[\'SYS\'][\'displayErrors\'] => 1</code>,<code>[\'SYS\'][\'exceptionalErrors\'] => 12290</code></p></div></div><div class="panel-group" role="tablist" aria-multiselectable="true"><div class="panel panel-default panel-flat searchhit"><div class="panel-heading" role="tab" id="heading-error"><h3 class="panel-title"><a role="button" data-bs-toggle="collapse" data-bs-parent="#accordion" href="#collapse-error" aria-expanded="true" aria-controls="collapse-error" class="collapsed"><span class="caret"></span><strong>Ajax error</strong></a></h3></div><div id="collapse-error" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-error"><div class="panel-body">'+await e.response.text()+"</div></div></div></div>"),void 0!==t?a.default(t).empty().html(n):a.default(this.selectorBody).empty().html(n)}}checkEnableInstallToolFile(){new n(this.getUrl("checkEnableInstallToolFile")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.checkLogin():this.showEnableInstallTool()},e=>{this.handleAjaxError(e)})}showEnableInstallTool(){new n(this.getUrl("showEnableInstallToolFile")).get({cache:"no-cache"}).then(async e=>{const t=await e.resolve();!0===t.success&&a.default(this.selectorBody).empty().append(t.html)},e=>{this.handleAjaxError(e)})}checkLogin(){new n(this.getUrl("checkLogin")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.loadMainLayout():this.showLogin()},e=>{this.handleAjaxError(e)})}showLogin(){new n(this.getUrl("showLogin")).get({cache:"no-cache"}).then(async e=>{const t=await e.resolve();!0===t.success&&a.default(this.selectorBody).empty().append(t.html)},e=>{this.handleAjaxError(e)})}login(){const e=a.default(".t3js-login-output"),t=s.render(c.loading,"Loading...","");e.empty().html(t),new n(this.getUrl()).post({install:{action:"login",token:a.default("[data-login-token]").data("login-token"),password:a.default(".t3-install-form-input-text").val()}}).then(async t=>{const a=await t.resolve();!0===a.success?this.executeSilentConfigurationUpdate():a.status.forEach(t=>{const a=i.render(t.severity,t.title,t.message);e.empty().html(a)})},e=>{this.handleAjaxError(e)})}logout(){new n(this.getUrl("logout")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success&&this.showEnableInstallTool()},e=>{this.handleAjaxError(e)})}loadCards(){const e=a.default(this.selectorMainContent);new n(this.getUrl("cards")).get({cache:"no-cache"}).then(async t=>{const a=await t.resolve();if(!0===a.success&&"undefined"!==a.html&&a.html.length>0)e.empty().append(a.html);else{const t=i.render(c.error,"Something went wrong","");e.empty().append(t)}},e=>{this.handleAjaxError(e)})}updateLoadingInfo(e){a.default(this.selectorBody).find("#t3js-ui-block-detail").text(e)}preAccessCheck(){this.updateLoadingInfo("Execute pre access check"),new n(this.getUrl("preAccessCheck","layout")).get({cache:"no-cache"}).then(async e=>{const t=await e.resolve();t.installToolLocked?this.checkEnableInstallToolFile():t.isAuthorized?this.executeSilentConfigurationUpdate():this.showLogin()},e=>{this.handleAjaxError(e)})}}}));
\ No newline at end of file
var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};define(["require","exports","jquery","TYPO3/CMS/Core/Ajax/AjaxRequest","TYPO3/CMS/Backend/Icons","TYPO3/CMS/Backend/Modal","./Renderable/InfoBox","./Renderable/ProgressBar","./Renderable/Severity"],(function(e,t,a,n,o,l,i,s,c){"use strict";a=__importDefault(a);return new class{constructor(){this.selectorBody=".t3js-body",this.selectorMainContent=".t3js-module-body"}initialize(){this.registerInstallToolRoutes(),a.default(document).on("click",".t3js-login-lockInstallTool",e=>{e.preventDefault(),this.logout()}),a.default(document).on("click",".t3js-login-login",e=>{e.preventDefault(),this.login()}),a.default(document).on("keydown","#t3-install-form-password",e=>{"Enter"===e.key&&(e.preventDefault(),a.default(".t3js-login-login").trigger("click"))}),a.default(document).on("click",".t3js-modulemenu-action",e=>{e.preventDefault();const t=a.default(e.currentTarget);window.location.href=t.data("link")}),a.default(document).on("click",".card .btn",t=>{t.preventDefault();const n=a.default(t.currentTarget),i=n.data("require"),s=n.data("inline");if(void 0!==s&&1===parseInt(s,10))e([i],e=>{e.initialize(n)});else{const t=n.closest(".card").find(".card-title").html(),s=n.data("modalSize")||l.sizes.large,c=l.advanced({type:l.types.default,title:t,size:s,content:a.default('<div class="modal-loading">'),additionalCssClasses:["install-tool-modal"],callback:t=>{e([i],e=>{e.initialize(t)})}});o.getIcon("spinner-circle",o.sizes.default,null,null,o.markupIdentifiers.inline).then(e=>{c.find(".modal-loading").append(e)})}});"backend"===a.default(this.selectorBody).data("context")?this.executeSilentConfigurationUpdate():this.preAccessCheck()}registerInstallToolRoutes(){void 0===TYPO3.settings&&(TYPO3.settings={ajaxUrls:{icons:window.location.origin+window.location.pathname+"?install[controller]=icon&install[action]=getIcon",icons_cache:window.location.origin+window.location.pathname+"?install[controller]=icon&install[action]=getCacheIdentifier"}})}getUrl(e,t,n){const o=a.default(this.selectorBody).data("context");let l=location.href;return l=l.replace(location.search,""),void 0===t&&(t=a.default(this.selectorBody).data("controller")),l=l+"?install[controller]="+t,void 0!==o&&""!==o&&(l=l+"&install[context]="+o),void 0!==e&&(l=l+"&install[action]="+e),void 0!==n&&(l=l+"&"+n),l}executeSilentConfigurationUpdate(){this.updateLoadingInfo("Checking session and executing silent configuration update"),new n(this.getUrl("executeSilentConfigurationUpdate","layout")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.executeSilentTemplateFileUpdate():this.executeSilentConfigurationUpdate()},e=>{this.handleAjaxError(e)})}executeSilentTemplateFileUpdate(){this.updateLoadingInfo("Checking session and executing silent template file update"),new n(this.getUrl("executeSilentTemplateFileUpdate","layout")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.executeSilentExtensionConfigurationSynchronization():this.executeSilentTemplateFileUpdate()},e=>{this.handleAjaxError(e)})}executeSilentExtensionConfigurationSynchronization(){const e=a.default(this.selectorBody);this.updateLoadingInfo("Executing silent extension configuration synchronization"),new n(this.getUrl("executeSilentExtensionConfigurationSynchronization","layout")).get({cache:"no-cache"}).then(async t=>{if(!0===(await t.resolve()).success)this.loadMainLayout();else{const t=i.render(c.error,"Something went wrong","");e.empty().append(t)}},e=>{this.handleAjaxError(e)})}loadMainLayout(){const e=a.default(this.selectorBody),t=e.data("controller");this.updateLoadingInfo("Loading main layout"),new n(this.getUrl("mainLayout","layout","install[module]="+t)).get({cache:"no-cache"}).then(async n=>{const o=await n.resolve();if(!0===o.success&&"undefined"!==o.html&&o.html.length>0)e.empty().append(o.html),"backend"!==a.default(this.selectorBody).data("context")&&e.find('.t3js-modulemenu-action[data-controller="'+t+'"]').addClass("modulemenu-action-active"),this.loadCards();else{const t=i.render(c.error,"Something went wrong","");e.empty().append(t)}},e=>{this.handleAjaxError(e)})}async handleAjaxError(e,t){let n;if(403===e.response.status){"backend"===a.default(this.selectorBody).data("context")?(n=i.render(c.error,"The install tool session expired. Please reload the backend and try again."),a.default(this.selectorBody).empty().append(n)):this.checkEnableInstallToolFile()}else{const o=this.getUrl(void 0,"upgrade");n=a.default('<div class="t3js-infobox callout callout-sm callout-danger"><div class="callout-body"><p>Something went wrong. Please use <b><a href="'+o+'">Check for broken extensions</a></b> to see if a loaded extension breaks this part of the install tool and unload it.</p><p>The box below may additionally reveal further details on what went wrong depending on your debug settings. It may help to temporarily switch to debug mode using <b>Settings > Configuration Presets > Debug settings.</b></p><p>If this error happens at an early state and no full exception back trace is shown, it may also help to manually increase debugging output in <code>typo3conf/LocalConfiguration.php</code>:<code>[\'BE\'][\'debug\'] => true</code>, <code>[\'SYS\'][\'devIPmask\'] => \'*\'</code>, <code>[\'SYS\'][\'displayErrors\'] => 1</code>,<code>[\'SYS\'][\'exceptionalErrors\'] => 12290</code></p></div></div><div class="panel-group" role="tablist" aria-multiselectable="true"><div class="panel panel-default panel-flat searchhit"><div class="panel-heading" role="tab" id="heading-error"><h3 class="panel-title"><a role="button" data-bs-toggle="collapse" data-bs-parent="#accordion" href="#collapse-error" aria-expanded="true" aria-controls="collapse-error" class="collapsed"><span class="caret"></span><strong>Ajax error</strong></a></h3></div><div id="collapse-error" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-error"><div class="panel-body">'+await e.response.text()+"</div></div></div></div>"),void 0!==t?a.default(t).empty().html(n):a.default(this.selectorBody).empty().html(n)}}checkEnableInstallToolFile(){new n(this.getUrl("checkEnableInstallToolFile")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.checkLogin():this.showEnableInstallTool()},e=>{this.handleAjaxError(e)})}showEnableInstallTool(){new n(this.getUrl("showEnableInstallToolFile")).get({cache:"no-cache"}).then(async e=>{const t=await e.resolve();!0===t.success&&a.default(this.selectorBody).empty().append(t.html)},e=>{this.handleAjaxError(e)})}checkLogin(){new n(this.getUrl("checkLogin")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success?this.loadMainLayout():this.showLogin()},e=>{this.handleAjaxError(e)})}showLogin(){new n(this.getUrl("showLogin")).get({cache:"no-cache"}).then(async e=>{const t=await e.resolve();!0===t.success&&a.default(this.selectorBody).empty().append(t.html)},e=>{this.handleAjaxError(e)})}login(){const e=a.default(".t3js-login-output"),t=s.render(c.loading,"Loading...","");e.empty().html(t),new n(this.getUrl()).post({install:{action:"login",token:a.default("[data-login-token]").data("login-token"),password:a.default(".t3-install-form-input-text").val()}}).then(async t=>{const a=await t.resolve();!0===a.success?this.executeSilentConfigurationUpdate():a.status.forEach(t=>{const a=i.render(t.severity,t.title,t.message);e.empty().html(a)})},e=>{this.handleAjaxError(e)})}logout(){new n(this.getUrl("logout")).get({cache:"no-cache"}).then(async e=>{!0===(await e.resolve()).success&&this.showEnableInstallTool()},e=>{this.handleAjaxError(e)})}loadCards(){const e=a.default(this.selectorMainContent);new n(this.getUrl("cards")).get({cache:"no-cache"}).then(async t=>{const a=await t.resolve();if(!0===a.success&&"undefined"!==a.html&&a.html.length>0)e.empty().append(a.html);else{const t=i.render(c.error,"Something went wrong","");e.empty().append(t)}},e=>{this.handleAjaxError(e)})}updateLoadingInfo(e){a.default(this.selectorBody).find("#t3js-ui-block-detail").text(e)}preAccessCheck(){this.updateLoadingInfo("Execute pre access check"),new n(this.getUrl("preAccessCheck","layout")).get({cache:"no-cache"}).then(async e=>{const t=await e.resolve();t.installToolLocked?this.checkEnableInstallToolFile():t.isAuthorized?this.executeSilentConfigurationUpdate():this.showLogin()},e=>{this.handleAjaxError(e)})}}}));
\ No newline at end of file
......@@ -170,7 +170,6 @@ class ViewModuleController
$this->initializeView('show');
$this->moduleTemplate->setBodyTag('<body class="typo3-module-viewpage">');
$this->moduleTemplate->setModuleName('typo3-module-viewpage');
$this->moduleTemplate->setModuleId('typo3-module-viewpage');
if (!$this->isValidDoktype($pageId)) {
......
Markdown is supported
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