Fix disabling "no" option via `enableoptions`
authorMatthias Schmidt <gravatronics@live.com>
Mon, 21 Aug 2017 19:05:02 +0000 (21:05 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 21 Aug 2017 19:05:02 +0000 (21:05 +0200)
See dc3ab016f2887491c563afbde14b242e5f6c9baf

wcfsetup/install/files/js/WCF.js

index ee51887997b29b047e0519f940ed8d28df3db519..243fbb850f27252074e186349c8cbc1c6c9fa487 100755 (executable)
@@ -3676,7 +3676,10 @@ WCF.Option.Handler = Class.extend({
                        else element.disable();
                        
                        if (element.parents('.optionTypeBoolean:eq(0)')) {
-                               var noElement = $('#' + element.wcfIdentify() + '_no');
+                               // escape dots so that they are not recognized as class selectors
+                               var elementId = element.wcfIdentify().replace(/\./g, "\\.");
+                               
+                               var noElement = $('#' + elementId + '_no');
                                if (enable) noElement.enable();
                                else noElement.disable();
                        }