private function showResetForm() { $this->getOutput()->addWikiMsg('prefs-reset-intro'); $htmlForm = new HTMLForm(array(), $this->getContext(), 'prefs-restore'); $htmlForm->setSubmitText(wfMsg('restoreprefs')); $htmlForm->setTitle($this->getTitle('reset')); $htmlForm->setSubmitCallback(array($this, 'submitReset')); $htmlForm->suppressReset(); $htmlForm->show(); }
function showResetForm() { global $wgOut; $wgOut->addWikiMsg('prefs-reset-intro'); $htmlForm = new HTMLForm(array(), 'prefs-restore'); $htmlForm->setSubmitText(wfMsg('restoreprefs')); $htmlForm->setTitle($this->getTitle('reset')); $htmlForm->setSubmitCallback(array(__CLASS__, 'submitReset')); $htmlForm->suppressReset(); $htmlForm->show(); }
function showResetForm() { $this->getOutput()->addWikiMsg('prefs-reset-intro'); $htmlForm = new HTMLForm(array(), $this->getContext(), 'prefs-restore'); $htmlForm->setSubmitText(wfMsg('restoreprefs')); $htmlForm->addHiddenField('username', $this->target); $htmlForm->addHiddenField('reset', '1'); $htmlForm->setSubmitCallback(array($this, 'submitReset')); $htmlForm->suppressReset(); $htmlForm->show(); }
/** * Show a form for filtering namespace and username * * @param $par String * @return String */ public function execute($par) { $this->setHeaders(); $this->outputHeader(); $form = new HTMLForm(array('Page1' => array('type' => 'text', 'name' => 'page1', 'label-message' => 'compare-page1', 'size' => '40', 'section' => 'page1', 'validation-callback' => array($this, 'checkExistingTitle')), 'Revision1' => array('type' => 'int', 'name' => 'rev1', 'label-message' => 'compare-rev1', 'size' => '8', 'section' => 'page1', 'validation-callback' => array($this, 'checkExistingRevision')), 'Page2' => array('type' => 'text', 'name' => 'page2', 'label-message' => 'compare-page2', 'size' => '40', 'section' => 'page2', 'validation-callback' => array($this, 'checkExistingTitle')), 'Revision2' => array('type' => 'int', 'name' => 'rev2', 'label-message' => 'compare-rev2', 'size' => '8', 'section' => 'page2', 'validation-callback' => array($this, 'checkExistingRevision')), 'Action' => array('type' => 'hidden', 'name' => 'action'), 'Diffonly' => array('type' => 'hidden', 'name' => 'diffonly'), 'Unhide' => array('type' => 'hidden', 'name' => 'unhide')), $this->getContext(), 'compare'); $form->setSubmitTextMsg('compare-submit'); $form->suppressReset(); $form->setMethod('get'); $form->setSubmitCallback(array(__CLASS__, 'showDiff')); $form->loadData(); $form->displayForm(''); $form->trySubmit(); }
/** * Show a form for filtering namespace and username * * @param $par String * @return String */ public function execute($par) { $this->setHeaders(); $this->outputHeader(); $form = new HTMLForm(array('Page1' => array('type' => 'text', 'name' => 'page1', 'label-message' => 'compare-page1', 'size' => '40', 'section' => 'page1'), 'Revision1' => array('type' => 'int', 'name' => 'rev1', 'label-message' => 'compare-rev1', 'size' => '8', 'section' => 'page1'), 'Page2' => array('type' => 'text', 'name' => 'page2', 'label-message' => 'compare-page2', 'size' => '40', 'section' => 'page2'), 'Revision2' => array('type' => 'int', 'name' => 'rev2', 'label-message' => 'compare-rev2', 'size' => '8', 'section' => 'page2'), 'Action' => array('type' => 'hidden', 'name' => 'action'), 'Diffonly' => array('type' => 'hidden', 'name' => 'diffonly')), 'compare'); $form->setSubmitText(wfMsg('compare-submit')); $form->suppressReset(); $form->setMethod('get'); $form->setTitle($this->getTitle()); $form->loadData(); $form->displayForm(''); self::showDiff($form->mFieldData); }
private function showResetForm() { if (!$this->getUser()->isAllowed('editmyoptions')) { throw new PermissionsError('editmyoptions'); } $this->getOutput()->addWikiMsg('prefs-reset-intro'); $context = new DerivativeContext($this->getContext()); $context->setTitle($this->getPageTitle('reset')); // Reset subpage $htmlForm = new HTMLForm(array(), $context, 'prefs-restore'); $htmlForm->setSubmitTextMsg('restoreprefs'); $htmlForm->setSubmitCallback(array($this, 'submitReset')); $htmlForm->suppressReset(); $htmlForm->show(); }