Allow targeting of checkboxes in enableoptions
authorMarcel Werk <burntime@woltlab.com>
Fri, 7 Aug 2020 20:53:27 +0000 (22:53 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 7 Aug 2020 20:53:27 +0000 (22:53 +0200)
Closes #3277

wcfsetup/install/files/js/WCF.js

index 0c7e61dca0a731911a853a769947bb5b28af6acb..c913d423f61252c05105ec8ef64fd0b0c9847d73 100755 (executable)
@@ -3698,7 +3698,7 @@ if (COMPILER_TARGET_DEFAULT) {
                                                this._enableOption($target, !isActive);
                                        }
                                        else {
-                                               var $dl = $('.' + $target + 'Input');
+                                               var $dl = $('.' + $.wcfEscapeID($target) + 'Input');
                                                if ($dl.length) {
                                                        this._enableOptions($dl.children('dd').find('input, select, textarea'), !isActive);
                                                }
@@ -3713,7 +3713,7 @@ if (COMPILER_TARGET_DEFAULT) {
                                                this._enableOption($target, isActive);
                                        }
                                        else {
-                                               var $dl = $('.' + $target + 'Input');
+                                               var $dl = $('.' + $.wcfEscapeID($target) + 'Input');
                                                if ($dl.length) {
                                                        this._enableOptions($dl.children('dd').find('input, select, textarea'), isActive);
                                                }