X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FWatchAction.php;h=e12a7276338231a4d99b442e7569f88b7f0790a2;hb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;hp=23505c020d11cd28e6458b800ce5e74954eb09d9;hpb=e758226c91935a1df2b6fd3ed1f18922d8bfb45b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php index 23505c020d..e12a727633 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,15 +54,27 @@ 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() );