protected function alterForm(HTMLForm $form) { $form->setWrapperLegendMsg('filerevert-legend'); $form->setSubmitTextMsg('filerevert-submit'); $form->addHiddenField('oldimage', $this->getRequest()->getText('oldimage')); $form->setTokenSalt(['revert', $this->getTitle()->getPrefixedDBkey()]); }
protected function alterForm(HTMLForm $form) { $form->setSubmitTextMsg('confirm-rollback-button'); $form->setTokenSalt('rollback'); // Copy parameters from GET to confirmation form $from = $this->getRequest()->getVal('from'); if ($from === null) { throw new BadRequestError('rollbackfailed', 'rollback-missingparam'); } foreach (['from', 'bot', 'hidediff', 'summary'] as $param) { $val = $this->getRequest()->getVal($param); if ($val !== null) { $form->addHiddenField($param, $val); } } }
protected function alterForm(HTMLForm $form) { $form->setSubmitTextMsg('confirm-watch-button'); $form->setTokenSalt('watch'); }