This changes hides the namespace checkboxes like on
SpecialRecentchanges.
Load the module 'mediawiki.special.recentchanges' which shows/hides the
checkboxes on change of the namespace selector.
Set the initial state of the visibility of the checkboxes already in the
HTML to prevent a flash of the checkboxes while loading.
Bug: T134556
Change-Id: I84198472307532ab89c499cb75f946aeb471405f
'mediawiki.special',
'mediawiki.special.changeslist',
] );
'mediawiki.special',
'mediawiki.special.changeslist',
] );
+ $out->addModules( 'mediawiki.special.recentchanges' );
$this->addHelpLink( 'Help:User contributions' );
$this->opts = [];
$this->addHelpLink( 'Help:User contributions' );
$this->opts = [];
$labelNewbies . '<br>' . $labelUsername . ' ' . $input . ' '
);
$labelNewbies . '<br>' . $labelUsername . ' ' . $input . ' '
);
+ $hidden = $this->opts['namespace'] === '' ? ' mw-input-hidden' : '';
$namespaceSelection = Xml::tags(
'div',
[],
$namespaceSelection = Xml::tags(
'div',
[],
) . "\u{00A0}" .
Html::rawElement(
'span',
) . "\u{00A0}" .
Html::rawElement(
'span',
- [ 'class' => 'mw-input-with-label' ],
+ [ 'class' => 'mw-input-with-label' . $hidden ],
Xml::checkLabel(
$this->msg( 'invert' )->text(),
'nsInvert',
Xml::checkLabel(
$this->msg( 'invert' )->text(),
'nsInvert',
$this->opts['nsInvert'],
[
'title' => $this->msg( 'tooltip-invert' )->text(),
$this->opts['nsInvert'],
[
'title' => $this->msg( 'tooltip-invert' )->text(),
- 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',
Xml::checkLabel(
$this->msg( 'namespace_association' )->text(),
'associated',
$this->opts['associated'],
[
'title' => $this->msg( 'tooltip-namespace_association' )->text(),
$this->opts['associated'],
[
'title' => $this->msg( 'tooltip-namespace_association' )->text(),