本文整理汇总了PHP中HTMLForm::suppressReset方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLForm::suppressReset方法的具体用法?PHP HTMLForm::suppressReset怎么用?PHP HTMLForm::suppressReset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLForm
的用法示例。
在下文中一共展示了HTMLForm::suppressReset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showResetForm
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();
}
示例2: showResetForm
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();
}
示例3: showResetForm
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();
}
示例4: execute
/**
* 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();
}
示例5: execute
/**
* 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);
}
示例6: showResetForm
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();
}