Exemplo n.º 1
0
 protected function alterForm(HTMLForm $form)
 {
     $form->setDisplayFormat('vform');
     $form->setId('mw-changeemail-form');
     $form->setTableId('mw-changeemail-table');
     $form->setWrapperLegend(false);
     $form->setSubmitTextMsg('changeemail-submit');
     $form->addHiddenField('returnto', $this->getRequest()->getVal('returnto'));
 }
 public function alterForm(HTMLForm $form)
 {
     global $wgPasswordResetRoutes;
     $form->setDisplayFormat('vform');
     // Turn the old-school line around the form off.
     // XXX This wouldn't be necessary here if we could set the format of
     // the HTMLForm to 'vform' at its creation, but there's no way to do so
     // from a FormSpecialPage class.
     $form->setWrapperLegend(false);
     $form->addHiddenFields($this->getRequest()->getValues('returnto', 'returntoquery'));
     $i = 0;
     if (isset($wgPasswordResetRoutes['username']) && $wgPasswordResetRoutes['username']) {
         $i++;
     }
     if (isset($wgPasswordResetRoutes['email']) && $wgPasswordResetRoutes['email']) {
         $i++;
     }
     if (isset($wgPasswordResetRoutes['domain']) && $wgPasswordResetRoutes['domain']) {
         $i++;
     }
     $message = $i > 1 ? 'passwordreset-text-many' : 'passwordreset-text-one';
     $form->setHeaderText($this->msg($message, $i)->parseAsBlock());
     $form->setSubmitTextMsg('mailmypassword');
 }
 public function alterForm(HTMLForm $form)
 {
     $form->setDisplayFormat('vform');
     $form->setWrapperLegend(false);
 }
Exemplo n.º 4
0
 public function alterForm(HTMLForm $form)
 {
     $form->setDisplayFormat('vform');
     $form->setWrapperLegend(false);
     wfRunHooks('LanguageSelector', array($this->getOutput(), 'mw-languageselector'));
 }
 protected function alterForm(HTMLForm &$form)
 {
     $form->setDisplayFormat('div');
     // Suppress default submit, so we can add one that is slightly nicer looking
     $form->suppressDefaultSubmit();
     $form->addButton('submit', $this->msg('htmlform-submit')->text(), null, array('class' => 'btn'));
 }