if ( $params ) {
$msg->params( $params );
}
- return $msg->parse();
+ return $msg;
}
$text = $title->getPrefixedText();
if ( $this->mParams['namespace'] !== false &&
!$title->inNamespace( $this->mParams['namespace'] )
) {
- return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text )->parse();
+ return $this->msg( 'htmlform-title-badnamespace', $this->mParams['namespace'], $text );
}
if ( $this->mParams['creatable'] && !$title->canExist() ) {
- return $this->msg( 'htmlform-title-not-creatable', $text )->escaped();
+ return $this->msg( 'htmlform-title-not-creatable', $text );
}
if ( $this->mParams['exists'] && !$title->exists() ) {
- return $this->msg( 'htmlform-title-not-exists', $text )->parse();
+ return $this->msg( 'htmlform-title-not-exists', $text );
}
return parent::validate( $value, $alldata );
}
protected function getInputWidget( $params ) {
- $this->mParent->getOutput()->addModules( 'mediawiki.widgets' );
if ( $this->mParams['namespace'] !== false ) {
$params['namespace'] = $this->mParams['namespace'];
}
return new TitleInputWidget( $params );
}
+ protected function shouldInfuseOOUI() {
+ return true;
+ }
+
+ protected function getOOUIModules() {
+ // FIXME: TitleInputWidget should be in its own module
+ return [ 'mediawiki.widgets' ];
+ }
+
public function getInputHtml( $value ) {
// add mw-searchInput class to enable search suggestions for non-OOUI, too
$this->mClass .= 'mw-searchInput';