Special:Preferences: Construct fake tabs to avoid FOUC
[lhc/web/wiklou.git] / includes / htmlform / HTMLForm.php
index ff6cfff..6b2afe1 100644 (file)
@@ -1604,9 +1604,10 @@ class HTMLForm extends ContextSource {
         * @param string $legend Legend text for the fieldset
         * @param string $section The section content in plain Html
         * @param array $attributes Additional attributes for the fieldset
+        * @param bool $isRoot Section is at the root of the tree
         * @return string The fieldset's Html
         */
-       protected function wrapFieldSetSection( $legend, $section, $attributes ) {
+       protected function wrapFieldSetSection( $legend, $section, $attributes, $isRoot ) {
                return Xml::fieldset( $legend, $section, $attributes ) . "\n";
        }
 
@@ -1689,7 +1690,9 @@ class HTMLForm extends ContextSource {
                                        if ( $fieldsetIDPrefix ) {
                                                $attributes['id'] = Sanitizer::escapeIdForAttribute( "$fieldsetIDPrefix$key" );
                                        }
-                                       $subsectionHtml .= $this->wrapFieldSetSection( $legend, $section, $attributes );
+                                       $subsectionHtml .= $this->wrapFieldSetSection(
+                                               $legend, $section, $attributes, $fields === $this->mFieldTree
+                                       );
                                } else {
                                        // Just return the inputs, nothing fancy.
                                        $subsectionHtml .= $section;