X-Git-Url: http://git.cyclocoop.org/url?a=blobdiff_plain;f=includes%2Factions%2FUnwatchAction.php;h=aa17b89c8d658a07d5c5f5fbd347fe1017c22556;hb=05bdcdbbd9c52f14b6de3897187b90174f49130a;hp=7f043e467659147c094eb92d0ce8d8a239dd4dd8;hpb=abb4d29b54c1bc4b4fb620f1124559ead13a074e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/UnwatchAction.php b/includes/actions/UnwatchAction.php index 7f043e4676..aa17b89c8d 100644 --- a/includes/actions/UnwatchAction.php +++ b/includes/actions/UnwatchAction.php @@ -31,22 +31,27 @@ class UnwatchAction extends WatchAction { return 'unwatch'; } - protected function getDescription() { - return $this->msg( 'removewatch' )->escaped(); - } - public function onSubmit( $data ) { self::doUnwatch( $this->getTitle(), $this->getUser() ); return true; } - protected function alterForm( HTMLForm $form ) { - $form->setSubmitTextMsg( 'confirm-unwatch-button' ); + protected function getFormFields() { + return [ + 'intro' => [ + 'type' => 'info', + 'vertical-label' => true, + 'raw' => true, + 'default' => $this->msg( 'confirm-unwatch-top' )->parse() + ] + ]; } - protected function preText() { - return $this->msg( 'confirm-unwatch-top' )->parse(); + protected function alterForm( HTMLForm $form ) { + parent::alterForm( $form ); + $form->setWrapperLegendMsg( 'removewatch' ); + $form->setSubmitTextMsg( 'confirm-unwatch-button' ); } public function onSuccess() {