[BUGFIX] fix javascript error "TBE_EDITOR not defined" in sys_action 06/20206/3
authorRalf Hettinger <ng@ralfhettinger.de>
Sat, 27 Apr 2013 08:12:00 +0000 (10:12 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 18 Nov 2013 23:45:43 +0000 (00:45 +0100)
This fixes the error "TBE_EDITOR not defined" which occured when using
sys_action > create backend user and assigning a db mount.

Resolves: #34544
Releases: 6.2, 6.1, 6.0
Change-Id: Idb78c23e2dea576fb1cab41979d4b068ca45a8b7
Reviewed-on: https://review.typo3.org/20206
Tested-by: uwe trotzek
Reviewed-by: Christian Buelter
Tested-by: Christian Buelter
Tested-by: Alexander Opitz
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/Form/FormEngine.php

index c7df96d..3fda742 100644 (file)
@@ -5719,23 +5719,23 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                                fObj = formObj[fName];
                                        }
 
-                                               // clear field before adding value, if configured so (maxitems==1)
-                                       if (typeof TBE_EDITOR.clearBeforeSettingFormValueFromBrowseWin[fName] != "undefined") {
-                                               clearSettings = TBE_EDITOR.clearBeforeSettingFormValueFromBrowseWin[fName];
-                                               setFormValueManipulate(fName, "Remove");
-
-                                                       // Clear the upload field
-                                               var filesContainer = document.getElementById(clearSettings.itemFormElID_file);
-                                               if(filesContainer) {
-                                                       filesContainer.innerHTML = filesContainer.innerHTML;
-                                               }
-
-                                                       // update len after removing value
-                                               len = fObj.length;
-                                       }
-
                                        if (isMultiple || isList) {
                                                if (!isMultiple) {
+                                                               // clear field before adding value, if configured so (maxitems==1)
+                                                       if (typeof TBE_EDITOR.clearBeforeSettingFormValueFromBrowseWin[fName] != "undefined") {
+                                                               clearSettings = TBE_EDITOR.clearBeforeSettingFormValueFromBrowseWin[fName];
+                                                               setFormValueManipulate(fName, "Remove");
+
+                                                                       // Clear the upload field
+                                                               var filesContainer = document.getElementById(clearSettings.itemFormElID_file);
+                                                               if(filesContainer) {
+                                                                       filesContainer.innerHTML = filesContainer.innerHTML;
+                                                               }
+
+                                                               // update len after removing value
+                                                               len = fObj.length;
+                                                       }
+
                                                                // If multiple values are not allowed, clear anything that is in the control already
                                                        fObj.options.length = 0;
                                                        fObj.length = 0; // Note: this is dangerous! "length" on the object is a reserved JS attribute!