-
- /**
- * Show a confirmation form for users wishing to clear their watchlist
- *
- * @param OutputPage $output
- * @param User $user
- */
- private function showClearForm( $output, $user ) {
- global $wgUser;
- if( ( $count = $this->showItemCount( $output, $user ) ) > 0 ) {
- $self = SpecialPage::getTitleFor( 'Watchlist' );
- $form = Xml::openElement( 'form', array( 'method' => 'post',
- 'action' => $self->getLocalUrl( 'action=clear' ) ) );
- $form .= Xml::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) );
- $form .= '<fieldset><legend>' . wfMsgHtml( 'watchlistedit-clear-legend' ) . '</legend>';
- $form .= wfMsgExt( 'watchlistedit-clear-confirm', 'parse' );
- $form .= '<p>' . Xml::submitButton( wfMsg( 'watchlistedit-clear-submit' ) ) . '</p>';
- $form .= '</fieldset></form>';
- $output->addHtml( $form );
- }
- }