Merge "Recentchanges: Hide instead of disable namespace selector checkboxes"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 4 Mar 2019 23:22:17 +0000 (23:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 4 Mar 2019 23:22:17 +0000 (23:22 +0000)
1  2 
includes/specials/SpecialRecentchanges.php

@@@ -682,16 -682,21 +682,21 @@@ class SpecialRecentChanges extends Chan
                        [ 'name' => 'namespace', 'id' => 'namespace' ]
                );
                $nsLabel = Xml::label( $this->msg( 'namespace' )->text(), 'namespace' );
-               $invert = Xml::checkLabel(
+               $attribs = [ 'class' => [ 'mw-input-with-label' ] ];
+               // Hide the checkboxes when the namespace filter is set to 'all'.
+               if ( $opts['namespace'] === '' ) {
+                       $attribs['class'][] = 'mw-input-hidden';
+               }
+               $invert = Html::rawElement( 'span', $attribs, Xml::checkLabel(
                        $this->msg( 'invert' )->text(), 'invert', 'nsinvert',
                        $opts['invert'],
                        [ 'title' => $this->msg( 'tooltip-invert' )->text() ]
-               );
-               $associated = Xml::checkLabel(
+               ) );
+               $associated = Html::rawElement( 'span', $attribs, Xml::checkLabel(
                        $this->msg( 'namespace_association' )->text(), 'associated', 'nsassociated',
                        $opts['associated'],
                        [ 'title' => $this->msg( 'tooltip-namespace_association' )->text() ]
-               );
+               ) );
  
                return [ $nsLabel, "$nsSelect $invert $associated" ];
        }
                        'span',
                        [ 'class' => 'rclistfrom' ],
                        $this->makeOptionsLink(
 -                              $this->msg( 'rclistfrom' )->rawParams( $now, $timenow, $datenow )->parse(),
 +                              $this->msg( 'rclistfrom' )->plaintextParams( $now, $timenow, $datenow )->parse(),
                                [ 'from' => $timestamp ],
                                $nondefaults
                        )