diff --git a/core/src/main/resources/lib/form/radioBlock/radioBlock.js b/core/src/main/resources/lib/form/radioBlock/radioBlock.js index 75d87b66f164..3d11d82c76ff 100644 --- a/core/src/main/resources/lib/form/radioBlock/radioBlock.js +++ b/core/src/main/resources/lib/form/radioBlock/radioBlock.js @@ -18,7 +18,11 @@ var radioBlockSupport = { n = blockStart; } while((n = n.next()) != blockEnd) { - n.style.display = show ? "" : "none"; + if (show) { + n.classList.remove("form-container--hidden") + } else { + n.classList.add("form-container--hidden") + } } layoutUpdateCallback.call(); } @@ -27,6 +31,7 @@ var radioBlockSupport = { // this needs to happen before TR.row-set-end rule kicks in. Behaviour.specify("INPUT.radio-block-control", 'radioBlock', -100, function(r) { r.id = "radio-block-"+(iota++); + r.nextSibling.setAttribute("for", r.id); // when one radio button is clicked, we need to update foldable block for // other radio buttons with the same name. To do this, group all the diff --git a/war/src/main/js/widgets/config/model/ConfigRowGrouping.js b/war/src/main/js/widgets/config/model/ConfigRowGrouping.js index beb1ef84fdbd..a4c0c52df424 100644 --- a/war/src/main/js/widgets/config/model/ConfigRowGrouping.js +++ b/war/src/main/js/widgets/config/model/ConfigRowGrouping.js @@ -67,7 +67,7 @@ ConfigRowGrouping.prototype.findToggleWidget = function(row) { var input = $(':input.block-control', row); if (input.length === 1) { this.toggleWidget = input; - this.label = input.parent().find('label').text(); + this.label = input.next().text(); input.addClass('disable-behavior'); } };