Merge "Enable configuration to supply options for Special:Search form"
[lhc/web/wiklou.git] / includes / specials / forms / PreferencesFormOOUI.php
index fd98dcb..9b86812 100644 (file)
@@ -139,7 +139,11 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
                        $label = $this->getLegend( $key );
                        $content =
                                $this->getHeaderText( $key ) .
-                               $this->displaySection( $this->mFieldTree[$key] ) .
+                               $this->displaySection(
+                                       $this->mFieldTree[$key],
+                                       "",
+                                       "mw-prefsection-$key-"
+                               ) .
                                $this->getFooterText( $key );
 
                        $tabPanels[] = new OOUI\TabPanelLayout( [
@@ -148,6 +152,7 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
                                'label' => $label,
                                'content' => new OOUI\FieldsetLayout( [
                                        'classes' => [ 'mw-prefs-section-fieldset' ],
+                                       'id' => "mw-prefsection-$key",
                                        'label' => $label,
                                        'items' => [
                                                new OOUI\Widget( [
@@ -190,7 +195,7 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
 
        /**
         * Get the keys of each top level preference section.
-        * @return array of section keys
+        * @return string[] List of section keys
         */
        function getPreferenceSections() {
                return array_keys( array_filter( $this->mFieldTree, 'is_array' ) );