[BUGFIX] Make TCA property "exclusiveKeys" work with single key 00/32600/2
authorRoland Waldner <mostwantedtypo3@gmail.com>
Thu, 4 Sep 2014 21:32:46 +0000 (23:32 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Fri, 5 Sep 2014 12:38:37 +0000 (14:38 +0200)
commita4d88d1f044b6c69687c9e2ee707a622f895e3e9
treed0dafaa64888fc3a7caa46c288c82a78844f80dd
parent3c1b2ca8ce5f65a8223a63f10757a7587d4db375
[BUGFIX] Make TCA property "exclusiveKeys" work with single key

It is necessary that "exclusiveValues" is a string in the JavaScript
method FormEngine.setSelectOptionFromExternalSource() because
in JavaScript strings (but not numbers) have a method match() which
is used in FormEngine.setSelectOptionFromExternalSource().

"exclusiveValues" representing a single key (e.g. -1) are of type
"Number" - in this case an JavaScript error is thrown when the
script calls match() on it.

This commit ensures that "exclusiveValues" is always casted to
String.

Resolves: #61276
Releases: 6.3, 6.2
Change-Id: I049a5e6d11b3b27be901baa1e00429ab200b9a04
Reviewed-on: http://review.typo3.org/32600
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js