Merge "SpecialContributions: Conditionally hide the namespace checkboxes"
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 81e2f9e..c0303b2 100644 (file)
@@ -45,6 +45,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        'mediawiki.special',
                        'mediawiki.special.changeslist',
                ] );
+               $out->addModules( 'mediawiki.special.recentchanges' );
                $this->addHelpLink( 'Help:User contributions' );
 
                $this->opts = [];
@@ -607,6 +608,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        $labelNewbies . '<br>' . $labelUsername . ' ' . $input . ' '
                );
 
+               $hidden = $this->opts['namespace'] === '' ? ' mw-input-hidden' : '';
                $namespaceSelection = Xml::tags(
                        'div',
                        [],
@@ -625,11 +627,11 @@ class SpecialContributions extends IncludableSpecialPage {
                        ) . "\u{00A0}" .
                                Html::rawElement(
                                        'span',
-                                       [ 'class' => 'mw-input-with-label' ],
+                                       [ 'class' => 'mw-input-with-label' . $hidden ],
                                        Xml::checkLabel(
                                                $this->msg( 'invert' )->text(),
                                                'nsInvert',
-                                               'nsInvert',
+                                               'nsinvert',
                                                $this->opts['nsInvert'],
                                                [
                                                        'title' => $this->msg( 'tooltip-invert' )->text(),
@@ -637,11 +639,11 @@ class SpecialContributions extends IncludableSpecialPage {
                                                ]
                                        ) . "\u{00A0}"
                                ) .
-                               Html::rawElement( 'span', [ 'class' => 'mw-input-with-label' ],
+                               Html::rawElement( 'span', [ 'class' => 'mw-input-with-label' . $hidden ],
                                        Xml::checkLabel(
                                                $this->msg( 'namespace_association' )->text(),
                                                'associated',
-                                               'associated',
+                                               'nsassociated',
                                                $this->opts['associated'],
                                                [
                                                        'title' => $this->msg( 'tooltip-namespace_association' )->text(),