[BUGFIX] Show editor for setup and constants even if the field is empty 21/50121/2
authorJan Helke <typo3@helke.de>
Sat, 8 Oct 2016 09:14:42 +0000 (11:14 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 8 Oct 2016 10:07:29 +0000 (12:07 +0200)
Resolves: #78188
Releases: master
Change-Id: Ic697d0259b5f9dc5780a6e5434a30b7337448c49
Reviewed-on: https://review.typo3.org/50121
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Łukasz Uznański <l.uznanski@macopedia.pl>
Tested-by: Łukasz Uznański <l.uznanski@macopedia.pl>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php
typo3/sysext/tstemplate/Resources/Private/Templates/InformationModule.html

index 02b069b..c30e203 100644 (file)
@@ -250,10 +250,12 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
                 unset($e);
             }
             if (isset($e['constants'])) {
+                $assigns['showConstantsEditor'] = true;
                 $assigns['constants'] = $tplRow['constants'];
                 $assigns['constantsLabel'] = BackendUtility::getFuncCheck($this->pObj->id, 'SET[includeTypoScriptFileContent]', $this->pObj->MOD_SETTINGS['includeTypoScriptFileContent'], '', '&e[constants]=1', 'id="checkIncludeTypoScriptFileContent"');
             }
             if (isset($e['config'])) {
+                $assigns['showConfigEditor'] = true;
                 $assigns['config'] = $tplRow['config'];
                 $assigns['configLabel'] = BackendUtility::getFuncCheck($this->pObj->id, 'SET[includeTypoScriptFileContent]', $this->pObj->MOD_SETTINGS['includeTypoScriptFileContent'], '', '&e[config]=1', 'id="checkIncludeTypoScriptFileContent"');
             }
index 7477c6b..acb024c 100644 (file)
@@ -14,7 +14,7 @@
         </div>
     </f:if>
     <f:format.raw>{formResult}</f:format.raw>
-    <f:if condition="{constants}">
+    <f:if condition="{showConstantsEditor}">
         <h3><f:translate key="{LLPrefix}constants"/></h3>
         <textarea name="data[constants]" rows="{numberOfRows}" wrap="off" class="text-monospace enable-tab" style="width:98%;height:70%" class="text-monospace">{constants}</textarea>
         <input type="hidden" name="e[constants]" value="1">
@@ -25,7 +25,7 @@
             </label>
         </div>
     </f:if>
-    <f:if condition="{config}">
+    <f:if condition="{showConfigEditor}">
         <h3><f:translate key="{LLPrefix}setup"/></h3>
         <textarea name="data[config]" rows="{numberOfRows}" wrap="off" class="text-monospace enable-tab" style="width:98%;height:70%" class="text-monospace">{config}</textarea>
         <input type="hidden" name="e[config]" value="1">
@@ -56,4 +56,4 @@
         <td width="80%">{line.data}</td>
         <td><a href="{line.url}" title="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:editField')}"><span class="btn btn-default"><core:icon identifier="actions-document-open" /></span></a></td>
     </tr>
-</f:section>
\ No newline at end of file
+</f:section>