From c377d07f2672091f87dedea41098b85a60bcf113 Mon Sep 17 00:00:00 2001 From: Davo Smith Date: Fri, 22 Sep 2017 10:15:46 +0100 Subject: [PATCH] MDL-60205 form: fix hiding of elements within groups with theme_clean --- lib/form/form.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/form/form.js b/lib/form/form.js index 2eaea03d9ff..59f3ac6a051 100644 --- a/lib/form/form.js +++ b/lib/form/form.js @@ -283,6 +283,13 @@ if (typeof M.form.dependencyManager === 'undefined') { els.each(function(node) { var e = node.ancestor('.fitem', true); if (e) { + // Cope with differences between clean and boost themes. + if (e.hasClass('fitem_fgroup')) { + // Items within groups are not wrapped in div.fitem in theme_clean, so + // we need to hide the input, not the div.fitem. + e = node; + } + if (hidden) { e.setAttribute('hidden', 'hidden'); } else {