setShowEmptyLabel( false ); return $field; } public function getHTML( $submitResult ) { // This is required for VForm HTMLForms that use that style regardless // of wgUseMediaWikiUIEverywhere (since they pre-date it). // When wgUseMediaWikiUIEverywhere is removed, this should be consolidated // with the addModuleStyles in SpecialPage->setHeaders. $this->getOutput()->addModuleStyles( [ 'mediawiki.ui', 'mediawiki.ui.button', 'mediawiki.ui.input', 'mediawiki.ui.checkbox', ] ); return parent::getHTML( $submitResult ); } protected function getFormAttributes() { $attribs = parent::getFormAttributes(); $attribs['class'] = [ 'mw-htmlform', 'mw-ui-vform', 'mw-ui-container' ]; return $attribs; } public function wrapForm( $html ) { // Always discard $this->mWrapperLegend return Html::rawElement( 'form', $this->getFormAttributes(), $html ); } }