[BUGFIX] Fix JavaScript for multiple select fields
authorBjoern Pedersen <bjoern.pedersen@frm2.tum.de>
Mon, 8 Aug 2011 17:17:58 +0000 (19:17 +0200)
committerGeorg Ringer <mail@ringerge.org>
Thu, 8 Sep 2011 07:37:12 +0000 (09:37 +0200)
The core changed the groupfield JS code to use only the size attribute
and disallows the "multiple" attribute as a check for multiple
entries (see Bug #25221).

This breaks dam and related extensions. The check should also allow a
set "Multiple" attribute.

Change-Id: I429486d93574638db836d7874e473641fb6ec4a6
Resolves: #28849
Releases: 4.6
Reviewed-on: http://review.typo3.org/4227
Reviewed-by: Franz Koch
Tested-by: Franz Koch
Reviewed-by: Xavier Perseguers
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
t3lib/class.t3lib_tceforms.php

index 4545bba..9074618 100644 (file)
@@ -5579,7 +5579,7 @@ class t3lib_TCEforms {
                                                // The "_list" element exists for multiple selection select types
                                        if (formObj[fName + "_list"]) {
                                                fObj = formObj[fName + "_list"];
-                                               isMultiple = fObj.getAttribute("multiple") == null && fObj.getAttribute("size") != "1";
+                                               isMultiple =  ( fObj.getAttribute("multiple") == null || fObj.getAttribute("multiple") == "multiple" ) && fObj.getAttribute("size") != "1";
                                                isList = true;
                                        } else {
                                                fObj = formObj[fName];