[BUGFIX] EXT:form - load custom form editor templates 63/51163/2
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Fri, 6 Jan 2017 13:55:12 +0000 (14:55 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Fri, 6 Jan 2017 14:38:16 +0000 (15:38 +0100)
Avoid javascript errors if a custom form editor templates is used.

Resolves: #79184
Releases: master
Change-Id: I5a769234dc9088e34b2ab69cf82ac613fcf82210
Reviewed-on: https://review.typo3.org/51163
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/Helper.js

index c0969bd..2f300ca 100644 (file)
@@ -265,7 +265,11 @@ define(['jquery'], function($) {
          * @return object
          */
         function getTemplate(templateName) {
-            return $(getDomElementDataAttribute('template', 'bracesWithKeyValue', [getDomElementDataAttributeValue(templateName)]));
+            if (!getUtility().isUndefinedOrNull(_configuration['domElementDataAttributeValues'][templateName])) {
+                templateName = getDomElementDataAttributeValue(templateName);
+            }
+
+            return $(getDomElementDataAttribute('template', 'bracesWithKeyValue', [templateName]));
         };
 
         /**