Fixed boolean user group options
authorAlexander Ebert <ebert@woltlab.com>
Mon, 3 Jul 2017 13:55:40 +0000 (15:55 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 3 Jul 2017 13:55:40 +0000 (15:55 +0200)
wcfsetup/install/files/acp/templates/userGroupOption.tpl

index 8cf0c51d3b3514322c1619ace69dd6795aa2e61c..e56876c318ce59f535b0d56123c4adee62450656 100644 (file)
@@ -18,7 +18,7 @@
                                dd = label.parentNode.nextElementSibling;
                                if (dd !== null && dd.nodeName === 'DD') {
                                        inputElements = dd.querySelectorAll('input, select, textarea');
-                                       isBoolean = (dd.childElementCount === 1 && dd.children[0].classList.contains('optionTypeBoolean'));
+                                       isBoolean = (dd.childElementCount > 0 && dd.children[0].classList.contains('optionTypeBoolean'));
                                        for (var j = 0, innerLength = inputElements.length; j < innerLength; j++) {
                                                inputElement = inputElements[j];
                                                inputElement.name = 'values[' + groupId + ']' + (inputElement.name.slice(-2) === '[]' ? '[]' : '');