[BUGFIX] Correct wrong markup in Template module 55/49455/5
authorMichael Oehlhof <typo3@oehlhof.de>
Thu, 11 Aug 2016 14:05:57 +0000 (16:05 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 16 Aug 2016 10:13:46 +0000 (12:13 +0200)
This patch brings back the missing labels and text
and removes double form element.

Resolves: #77471
Releases: master
Change-Id: I2f072580ee881c3074f70aaa28168d2fe7f050b3
Reviewed-on: https://review.typo3.org/49455
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Resources/Private/Partials/NoTemplate.html [deleted file]
typo3/sysext/tstemplate/Resources/Private/Templates/NoTemplate.html [new file with mode: 0644]

index b2e08ef..b0ec11d 100644 (file)
@@ -483,8 +483,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
             $previousPage['aHref'] = BackendUtility::getModuleUrl('web_ts', $urlParameters);
             $moduleContent['previousPage'] = $previousPage;
         }
-        $view = $this->getFluidTemplateObject('tstemplate', 'Main');
-        $view->assign('partialName', 'NoTemplate');
+        $view = $this->getFluidTemplateObject('tstemplate', 'NoTemplate');
         $view->assign('content', $moduleContent);
         return $view->render();
     }
@@ -674,8 +673,7 @@ page.10.value = HELLO WORLD!
         $view = GeneralUtility::makeInstance(StandaloneView::class);
         $view->getRenderingContext()->getTemplatePaths()->fillDefaultsByPackageName($extensionName);
         $view->getRenderingContext()->setControllerAction($templateName);
-        // @TODO: not sure this should stay; this value should in any case be a *proper* extension name!
-        $view->getRequest()->setControllerExtensionName('web_ts');
+        $view->getRequest()->setControllerExtensionName('tstemplate');
         return $view;
     }
 
diff --git a/typo3/sysext/tstemplate/Resources/Private/Partials/NoTemplate.html b/typo3/sysext/tstemplate/Resources/Private/Partials/NoTemplate.html
deleted file mode 100644 (file)
index 8176dad..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<form action="{content.actionName}" method="post" enctype="multipart/form-data" id="TypoScriptTemplateModuleController" name="editForm" class="form">
-    <f:be.infobox title="{f:translate(key: 'noTemplate', extensionName:'tstemplate')}" state="{content.state}">
-        <p>
-            <f:translate key="noTemplateDescription" />
-            <br />
-            <f:translate key="createTemplateToEditConfiguration" />
-        </p>
-    </f:be.infobox>
-
-    <h2><f:translate key="newWebsite" />{staticsText}</h2>
-    <div>
-        <p><f:translate key="newWebsiteDescription" /></p>
-        {content.selector -> f:format.raw() -> f:or(alternative: '<input type="hidden" name="createStandard" value="" />')}
-        <input class="btn btn-primary" type="submit" form="TypoScriptTemplateModuleController" name="newWebsite" value="{f:translate(key: 'newWebsiteAction', extensionName:'tstemplate')}" />
-    </div>
-
-    <h2><f:translate key="extTemplate" /></h2>
-    <div>
-        <p><f:translate key="extTemplateDescription" /></p>
-        <input class="btn btn-default" type="submit" form="TypoScriptTemplateModuleController" name="createExtension" value="{f:translate(key: 'extTemplateAction', extensionName:'tstemplate')}" />
-    </div>
-
-    <f:if condition="{content.previousPage}">
-        <h3><f:translate key="goToClosest" /></h3>
-        <div>
-            <p><f:translate key="goToClosestDescription"  arguments="{0: content.previousPage.title, 1: content.previousPage.uid}" /></p>
-            <a class="btn btn-default" href="{content.previousPage.aHref}"><f:translate key="goToClosestAction" /></a>
-        </div>
-    </f:if>
-</form>
\ No newline at end of file
diff --git a/typo3/sysext/tstemplate/Resources/Private/Templates/NoTemplate.html b/typo3/sysext/tstemplate/Resources/Private/Templates/NoTemplate.html
new file mode 100644 (file)
index 0000000..8176dad
--- /dev/null
@@ -0,0 +1,30 @@
+<form action="{content.actionName}" method="post" enctype="multipart/form-data" id="TypoScriptTemplateModuleController" name="editForm" class="form">
+    <f:be.infobox title="{f:translate(key: 'noTemplate', extensionName:'tstemplate')}" state="{content.state}">
+        <p>
+            <f:translate key="noTemplateDescription" />
+            <br />
+            <f:translate key="createTemplateToEditConfiguration" />
+        </p>
+    </f:be.infobox>
+
+    <h2><f:translate key="newWebsite" />{staticsText}</h2>
+    <div>
+        <p><f:translate key="newWebsiteDescription" /></p>
+        {content.selector -> f:format.raw() -> f:or(alternative: '<input type="hidden" name="createStandard" value="" />')}
+        <input class="btn btn-primary" type="submit" form="TypoScriptTemplateModuleController" name="newWebsite" value="{f:translate(key: 'newWebsiteAction', extensionName:'tstemplate')}" />
+    </div>
+
+    <h2><f:translate key="extTemplate" /></h2>
+    <div>
+        <p><f:translate key="extTemplateDescription" /></p>
+        <input class="btn btn-default" type="submit" form="TypoScriptTemplateModuleController" name="createExtension" value="{f:translate(key: 'extTemplateAction', extensionName:'tstemplate')}" />
+    </div>
+
+    <f:if condition="{content.previousPage}">
+        <h3><f:translate key="goToClosest" /></h3>
+        <div>
+            <p><f:translate key="goToClosestDescription"  arguments="{0: content.previousPage.title, 1: content.previousPage.uid}" /></p>
+            <a class="btn btn-default" href="{content.previousPage.aHref}"><f:translate key="goToClosestAction" /></a>
+        </div>
+    </f:if>
+</form>
\ No newline at end of file