diff --git a/lib/form/yui/shortforms/shortforms.js b/lib/form/yui/shortforms/shortforms.js index a14746dca11..dbbb4546f01 100644 --- a/lib/form/yui/shortforms/shortforms.js +++ b/lib/form/yui/shortforms/shortforms.js @@ -23,8 +23,7 @@ YUI.add('moodle-form-shortforms', function(Y) { }, CSS = { COLLAPSED : 'collapsed', - FHEADER : 'fheader', - JSPROCESSED : 'jsprocessed' + FHEADER : 'fheader' }, ATTRS = {}; @@ -67,7 +66,6 @@ YUI.add('moodle-form-shortforms', function(Y) { Y.one('#'+this.get('formid')).delegate('click', this.switch_state, SELECTORS.FIELDSETCOLLAPSIBLE+' .'+CSS.FHEADER); }, process_fieldset : function(fieldset) { - fieldset.addClass(CSS.JSPROCESSED); // Get legend element. var legendelement = fieldset.one(SELECTORS.LEGENDFTOGGLER); diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php index 78cda2b7d0e..a9f42c78b51 100644 --- a/lib/tests/behat/behat_forms.php +++ b/lib/tests/behat/behat_forms.php @@ -112,7 +112,7 @@ class behat_forms extends behat_base { try { // Expand fieldsets. - $fieldsets = $this->find_all('css', 'fieldset.collapsed.jsprocessed a.fheader'); + $fieldsets = $this->find_all('css', 'fieldset.collapsed a.fheader'); // We are supposed to have fieldsets here, otherwise exception. diff --git a/theme/base/style/core.css b/theme/base/style/core.css index 6d50030aca2..7228efcc931 100644 --- a/theme/base/style/core.css +++ b/theme/base/style/core.css @@ -241,8 +241,8 @@ a.skip:active {position: static;display: block;} .mform fieldset.error {border: 1px solid #A00;} .mform fieldset.collapsible legend a.fheader {padding: 0 5px 0 20px; background: url([[pix:t/expanded]]) 2px center no-repeat;} .mform fieldset.collapsed legend a.fheader {background: url([[pix:t/collapsed]]) 2px center no-repeat;} -.mform fieldset.collapsed.jsprocessed {border-width: 1px 0 0 0; padding: 0;} -.mform fieldset.collapsed.jsprocessed div.fcontainer {display: none;} +.jsenabled .mform fieldset.collapsed {border-width: 1px 0 0 0; padding: 0;} +.jsenabled .mform fieldset.collapsed div.fcontainer {display: none;} .mform .fitem {width:100%;overflow:hidden;margin-top:5px;margin-bottom:1px;clear:right;} .mform .fitem .fitemtitle {width:15%;text-align:right;float:left;} .mform .fitem .fitemtitle div {display: inline;}