[BUGFIX] Correct upload field name for TCA internal_type file 32/37732/2
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 4 Mar 2015 14:46:16 +0000 (15:46 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Wed, 11 Mar 2015 14:34:44 +0000 (15:34 +0100)
Enforcing a file doesn't take the file upload field into
consideration. Correct the name of the check in JavaScript.

Resolves: #47372
Releases: master,6.2
Change-Id: I6958cc32afb72ac0998bb3c4ae99de14ba39aef8
Reviewed-on: http://review.typo3.org/37732
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js

index d59d2fc..bccc118 100644 (file)
@@ -214,7 +214,7 @@ var TBE_EDITOR = {
 
                                } else {
                                                // special treatment for file uploads
-                                       var tempObj = document[TBE_EDITOR.formname][elementName.replace(/^data/, 'data_files')];
+                                       var tempObj = document[TBE_EDITOR.formname][elementName.replace(/^data/, 'data_files') + '[]'];
                                        numberOfElements = form.length;
 
                                        if (tempObj && tempObj.type == 'file' && tempObj.value) {