if ( $this->getRequest()->getCheck( 'success' ) ) {
$out->wrapWikiMsg(
- "<div class=\"successbox\">\n$1\n</div>",
+ Html::rawElement(
+ 'div',
+ array(
+ 'class' => 'mw-preferences-messagebox successbox',
+ 'id' => 'mw-preferences-success'
+ ),
+ Html::element( 'p', array(), '$1' )
+ ),
'savedprefs'
);
}
+ $this->addHelpLink( 'Help:Preferences' );
+
$htmlForm = Preferences::getFormObject( $this->getUser(), $this->getContext() );
$htmlForm->setSubmitCallback( array( 'Preferences', 'tryUISubmit' ) );
$this->getOutput()->addWikiMsg( 'prefs-reset-intro' );
$context = new DerivativeContext( $this->getContext() );
- $context->setTitle( $this->getTitle( 'reset' ) ); // Reset subpage
+ $context->setTitle( $this->getPageTitle( 'reset' ) ); // Reset subpage
$htmlForm = new HTMLForm( array(), $context, 'prefs-restore' );
$htmlForm->setSubmitTextMsg( 'restoreprefs' );
+ $htmlForm->setSubmitDestructive();
$htmlForm->setSubmitCallback( array( $this, 'submitReset' ) );
$htmlForm->suppressReset();
$user->resetOptions( 'all', $this->getContext() );
$user->saveSettings();
- $url = $this->getTitle()->getFullURL( 'success' );
+ $url = $this->getPageTitle()->getFullURL( 'success' );
$this->getOutput()->redirect( $url );