X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FWatchAction.php;h=528e0e2ef130af16eb4eea691e977efb6281f851;hb=5dc68aedf45a7b2de6d6c6e736f9014873aa8186;hp=23505c020d11cd28e6458b800ce5e74954eb09d9;hpb=bdfe02223205923d923923dd420ba0dd863cd0fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php index 23505c020d..528e0e2ef1 100644 --- a/includes/actions/WatchAction.php +++ b/includes/actions/WatchAction.php @@ -35,11 +35,8 @@ class WatchAction extends FormAction { return false; } - /** - * @return string HTML - */ protected function getDescription() { - return $this->msg( 'addwatch' )->escaped(); + return ''; } public function onSubmit( $data ) { @@ -57,22 +54,32 @@ class WatchAction extends FormAction { parent::checkCanExecute( $user ); } + protected function usesOOUI() { + return true; + } + + protected function getFormFields() { + return [ + 'intro' => [ + 'type' => 'info', + 'vertical-label' => true, + 'raw' => true, + 'default' => $this->msg( 'confirm-watch-top' )->parse() + ] + ]; + } + protected function alterForm( HTMLForm $form ) { + $form->setWrapperLegendMsg( 'addwatch' ); $form->setSubmitTextMsg( 'confirm-watch-button' ); $form->setTokenSalt( 'watch' ); } - protected function preText() { - return $this->msg( 'confirm-watch-top' )->parse(); - } - public function onSuccess() { $msgKey = $this->getTitle()->isTalkPage() ? 'addedwatchtext-talk' : 'addedwatchtext'; $this->getOutput()->addWikiMsg( $msgKey, $this->getTitle()->getPrefixedText() ); } - /* Static utility methods */ - /** * Watch or unwatch a page * @since 1.22