当前位置: 首页>>代码示例>>PHP>>正文


PHP Xml::inputLabel方法代码示例

本文整理汇总了PHP中Xml::inputLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP Xml::inputLabel方法的具体用法?PHP Xml::inputLabel怎么用?PHP Xml::inputLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Xml的用法示例。


在下文中一共展示了Xml::inputLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 function show()
 {
     $out = $this->getOutput();
     $user = $this->getUser();
     // Header
     $out->addWikiMsg('abusefilter-tools-text');
     // Expression evaluator
     $eval = '';
     $eval .= AbuseFilter::buildEditBox('', 'wpTestExpr');
     // Only let users with permission actually test it
     if ($user->isAllowed('abusefilter-modify')) {
         $eval .= Xml::tags('p', null, Xml::element('input', array('type' => 'button', 'id' => 'mw-abusefilter-submitexpr', 'value' => $this->msg('abusefilter-tools-submitexpr')->text())));
         $eval .= Xml::element('p', array('id' => 'mw-abusefilter-expr-result'), ' ');
     }
     $eval = Xml::fieldset($this->msg('abusefilter-tools-expr')->text(), $eval);
     $out->addHTML($eval);
     $out->addModules('ext.abuseFilter.tools');
     if ($user->isAllowed('abusefilter-modify')) {
         // Hacky little box to re-enable autoconfirmed if it got disabled
         $rac = '';
         $rac .= Xml::inputLabel($this->msg('abusefilter-tools-reautoconfirm-user')->text(), 'wpReAutoconfirmUser', 'reautoconfirm-user', 45);
         $rac .= ' ';
         $rac .= Xml::element('input', array('type' => 'button', 'id' => 'mw-abusefilter-reautoconfirmsubmit', 'value' => $this->msg('abusefilter-tools-reautoconfirm-submit')->text()));
         $rac = Xml::fieldset($this->msg('abusefilter-tools-reautoconfirm')->text(), $rac);
         $out->addHTML($rac);
     }
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:27,代码来源:AbuseFilterViewTools.php

示例2: showForm

 /**
  * Once a set of revisions have been selected,
  * list them and request a reason/comment for confirmation.
  */
 function showForm()
 {
     global $wgOut, $wgUser;
     $special = Title::makeTitle(NS_SPECIAL, 'HideRevision');
     $wgOut->addWikiText(wfMsg('hiderevision-text'));
     $wgOut->addHtml($this->revisionList() . $this->archiveList() . Xml::openElement('form', array('action' => $special->getLocalUrl('action=submit'), 'method' => 'post')) . "<br />" . Xml::inputLabel(wfMsgHTML('hiderevision-reason'), 'wpReason', 'wpReason', 60, $this->mReason) . "<br />" . Xml::submitButton(wfMsgHTML('hiderevision-submit')) . $this->revisionFields() . Html::Hidden('wpEditToken', $wgUser->editToken()) . Xml::closeElement('form'));
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:11,代码来源:HideRevision_body.php

示例3: show

 function show()
 {
     global $wgOut, $wgUser, $wgRequest;
     AbuseFilter::disableConditionLimit();
     if (!$wgUser->isAllowed('abusefilter-modify')) {
         $wgOut->addWikiMsg('abusefilter-mustbeeditor');
         return;
     }
     $this->loadParameters();
     $wgOut->setPageTitle(wfMsg('abusefilter-test'));
     $wgOut->addWikiMsg('abusefilter-test-intro', self::$mChangeLimit);
     $output = '';
     $output .= AbuseFilter::buildEditBox($this->mFilter, 'wpTestFilter') . "\n";
     $output .= Xml::inputLabel(wfMsg('abusefilter-test-load-filter'), 'wpInsertFilter', 'mw-abusefilter-load-filter', 10, '') . '&#160;' . Xml::element('input', array('type' => 'button', 'value' => wfMsg('abusefilter-test-load'), 'id' => 'mw-abusefilter-load'));
     $output = Xml::tags('div', array('id' => 'mw-abusefilter-test-editor'), $output);
     $output .= Xml::tags('p', null, Xml::checkLabel(wfMsg('abusefilter-test-shownegative'), 'wpShowNegative', 'wpShowNegative', $this->mShowNegative));
     // Selectory stuff
     $selectFields = array();
     $selectFields['abusefilter-test-user'] = Xml::input('wpTestUser', 45, $this->mTestUser);
     $selectFields['abusefilter-test-period-start'] = Xml::input('wpTestPeriodStart', 45, $this->mTestPeriodStart);
     $selectFields['abusefilter-test-period-end'] = Xml::input('wpTestPeriodEnd', 45, $this->mTestPeriodEnd);
     $selectFields['abusefilter-test-page'] = Xml::input('wpTestPage', 45, $this->mTestPage);
     $output .= Xml::buildForm($selectFields, 'abusefilter-test-submit');
     $output .= Html::hidden('title', $this->getTitle('test')->getPrefixedText());
     $output = Xml::tags('form', array('action' => $this->getTitle('test')->getLocalURL(), 'method' => 'post'), $output);
     $output = Xml::fieldset(wfMsg('abusefilter-test-legend'), $output);
     $wgOut->addHTML($output);
     if ($wgRequest->wasPosted()) {
         $this->doTest();
     }
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:31,代码来源:AbuseFilterViewTestBatch.php

示例4: switchForm

 /**
  * Output a form to allow searching for a user
  */
 function switchForm()
 {
     global $wgScript;
     $this->getOutput()->addModules('ext.centralauth.globaluserautocomplete');
     $this->getOutput()->addModuleStyles('mediawiki.special');
     $this->getOutput()->addHTML(Xml::openElement('form', array('method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1')) . Html::hidden('title', $this->getPageTitle()) . Xml::openElement('fieldset') . Xml::element('legend', array(), $this->msg('userrights-lookup-user')->text()) . Xml::inputLabel($this->msg('userrights-user-editname')->text(), 'user', 'username', 30, $this->mTarget, array('class' => 'mw-autocomplete-global-user')) . ' <br />' . Xml::submitButton($this->msg('editusergroup')->text()) . Xml::closeElement('fieldset') . Xml::closeElement('form') . "\n");
 }
开发者ID:NDKilla,项目名称:mediawiki-extensions-CentralAuth,代码行数:10,代码来源:SpecialGlobalGroupMembership.php

示例5: show

 function show()
 {
     global $wgOut, $wgUser;
     // Header
     $wgOut->setSubTitle(wfMsg('abusefilter-tools-subtitle'));
     $wgOut->addWikiMsg('abusefilter-tools-text');
     // Expression evaluator
     $eval = '';
     $eval .= AbuseFilter::buildEditBox('', 'wpTestExpr');
     // Only let users with permission actually test it
     if ($wgUser->isAllowed('abusefilter-modify')) {
         $eval .= Xml::tags('p', null, Xml::element('input', array('type' => 'button', 'id' => 'mw-abusefilter-submitexpr', 'onclick' => 'doExprSubmit();', 'value' => wfMsg('abusefilter-tools-submitexpr'))));
         $eval .= Xml::element('p', array('id' => 'mw-abusefilter-expr-result'), ' ');
     }
     $eval = Xml::fieldset(wfMsg('abusefilter-tools-expr'), $eval);
     $wgOut->addHTML($eval);
     // Associated script
     $exprScript = file_get_contents(dirname(__FILE__) . '/tools.js');
     $wgOut->addInlineScript($exprScript);
     global $wgUser;
     if ($wgUser->isAllowed('abusefilter-modify')) {
         // Hacky little box to re-enable autoconfirmed if it got disabled
         $rac = '';
         $rac .= Xml::inputLabel(wfMsg('abusefilter-tools-reautoconfirm-user'), 'wpReAutoconfirmUser', 'reautoconfirm-user', 45);
         $rac .= '&#160;';
         $rac .= Xml::element('input', array('type' => 'button', 'id' => 'mw-abusefilter-reautoconfirmsubmit', 'onclick' => 'doReautoSubmit();', 'value' => wfMsg('abusefilter-tools-reautoconfirm-submit')));
         $rac = Xml::fieldset(wfMsg('abusefilter-tools-reautoconfirm'), $rac);
         $wgOut->addHTML($rac);
     }
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:30,代码来源:AbuseFilterViewTools.php

示例6: execute

 public function execute($subpage)
 {
     global $wgOut, $wgRequest, $wgUser, $wgCacheEpoch, $wgCityId;
     wfProfileIn(__METHOD__);
     $this->setHeaders();
     $this->mTitle = SpecialPage::getTitleFor('UserData');
     if ($this->isRestricted() && !$this->userCanExecute($wgUser)) {
         $this->displayRestrictionError();
         wfProfileOut(__METHOD__);
         return;
     }
     $result = '';
     $userId = $wgRequest->getInt('userId');
     if ($userId) {
         $user = User::newFromId($userId);
         if (!empty($user)) {
             //todo: add nicer result - right now only name and link to user page
             $result = Xml::element('a', array('href' => $user->getUserPage()->getLocalURL()), $user->getName(), false);
         }
     }
     $wgOut->addHTML(Xml::openElement('form', array('action' => $this->mTitle->getFullURL(), 'method' => 'get')));
     $wgOut->addHTML(Xml::inputLabel(wfMsg('userdata-userid-label'), 'userId', 'user-id', false, $userId));
     $wgOut->addHTML('<br>' . Xml::submitButton(wfMsg('userdata-submit')));
     $wgOut->addHTML(Xml::closeElement('form'));
     if ($result) {
         $wgOut->addHTML('<hr>' . $result);
     }
     wfProfileOut(__METHOD__);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:29,代码来源:SpecialUserData.php

示例7: getPageHeader

 function getPageHeader()
 {
     global $wgScript, $wgMiserMode;
     # Do not show useless input form if wiki is running in misermode
     if ($wgMiserMode) {
         return '';
     }
     $prefix = $this->prefix;
     $t = $this->getTitle();
     return Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)) . Xml::openElement('fieldset') . Xml::element('legend', null, wfMsg('withoutinterwiki-legend')) . Html::hidden('title', $t->getPrefixedText()) . Xml::inputLabel(wfMsg('allpagesprefix'), 'prefix', 'wiprefix', 20, $prefix) . ' ' . Xml::submitButton(wfMsg('withoutinterwiki-submit')) . Xml::closeElement('fieldset') . Xml::closeElement('form');
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:11,代码来源:SpecialWithoutinterwiki.php

示例8: draw_OTP

 function draw_OTP()
 {
     global $wgOut, $wgUser;
     $formu = Xml::openElement('form', array('method' => 'post', 'action' => $this->getTitle()->getLocalUrl('action=submit')));
     $formu .= Xml::inputLabel(wfMsg('latch-OTP') . ' ', 'txt_OTP', 'txt_OTP', 20) . '<BR>&nbsp';
     $formu .= Xml::submitButton(wfMsg('latch-enter'), array('name' => 'clickBotOTP')) . '<BR>';
     # Adding protection against CSRF
     $formu .= Html::hidden('token', $wgUser->getEditToken(), array('id' => 'token'));
     $formu .= Xml::closeElement('form');
     $wgOut->addHTML($formu);
 }
开发者ID:ElevenPaths,项目名称:latch-plugin-mediawiki,代码行数:11,代码来源:LatchOTP.php

示例9: execute

 function execute($par)
 {
     $mime = $par ? $par : $this->getRequest()->getText('mime');
     $this->setHeaders();
     $this->outputHeader();
     $this->getOutput()->addHTML(Xml::openElement('form', array('id' => 'specialmimesearch', 'method' => 'get', 'action' => SpecialPage::getTitleFor('MIMEsearch')->getLocalUrl())) . Xml::openElement('fieldset') . Html::hidden('title', SpecialPage::getTitleFor('MIMEsearch')->getPrefixedText()) . Xml::element('legend', null, wfMsg('mimesearch')) . Xml::inputLabel(wfMsg('mimetype'), 'mime', 'mime', 20, $mime) . ' ' . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('fieldset') . Xml::closeElement('form'));
     list($this->major, $this->minor) = File::splitMime($mime);
     if ($this->major == '' || $this->minor == '' || $this->minor == 'unknown' || !self::isValidType($this->major)) {
         return;
     }
     parent::execute($par);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:SpecialMIMEsearch.php

示例10: execute

 function execute($par)
 {
     global $wgUrlProtocols, $wgMiserMode;
     $this->setHeaders();
     $this->outputHeader();
     $out = $this->getOutput();
     $out->allowClickjacking();
     $request = $this->getRequest();
     $target = $request->getVal('target', $par);
     $namespace = $request->getIntorNull('namespace', null);
     $protocols_list = array();
     foreach ($wgUrlProtocols as $prot) {
         if ($prot !== '//') {
             $protocols_list[] = $prot;
         }
     }
     $target2 = $target;
     $protocol = '';
     $pr_sl = strpos($target2, '//');
     $pr_cl = strpos($target2, ':');
     if ($pr_sl) {
         // For protocols with '//'
         $protocol = substr($target2, 0, $pr_sl + 2);
         $target2 = substr($target2, $pr_sl + 2);
     } elseif (!$pr_sl && $pr_cl) {
         // For protocols without '//' like 'mailto:'
         $protocol = substr($target2, 0, $pr_cl + 1);
         $target2 = substr($target2, $pr_cl + 1);
     } elseif ($protocol == '' && $target2 != '') {
         // default
         $protocol = 'http://';
     }
     if ($protocol != '' && !in_array($protocol, $protocols_list)) {
         // unsupported protocol, show original search request
         $target2 = $target;
         $protocol = '';
     }
     $out->addWikiMsg('linksearch-text', '<nowiki>' . $this->getLanguage()->commaList($protocols_list) . '</nowiki>');
     $s = Xml::openElement('form', array('id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'])) . Html::hidden('title', $this->getTitle()->getPrefixedDbKey()) . '<fieldset>' . Xml::element('legend', array(), $this->msg('linksearch')->text()) . Xml::inputLabel($this->msg('linksearch-pat')->text(), 'target', 'target', 50, $target) . ' ';
     if (!$wgMiserMode) {
         $s .= Html::namespaceSelector(array('selected' => $namespace, 'all' => '', 'label' => $this->msg('linksearch-ns')->text()), array('name' => 'namespace', 'id' => 'namespace', 'class' => 'namespaceselector'));
     }
     $s .= Xml::submitButton($this->msg('linksearch-ok')->text()) . '</fieldset>' . Xml::closeElement('form');
     $out->addHTML($s);
     if ($target != '') {
         $this->setParams(array('query' => $target2, 'namespace' => $namespace, 'protocol' => $protocol));
         parent::execute($par);
         if ($this->mMungedQuery === false) {
             $out->addWikiMsg('linksearch-error');
         }
     }
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:52,代码来源:SpecialLinkSearch.php

示例11: wfSpecialMIMEsearch

/**
 * Output the HTML search form, and constructs the MIMEsearchPage object.
 */
function wfSpecialMIMEsearch($par = null)
{
    global $wgRequest, $wgTitle, $wgOut;
    $mime = isset($par) ? $par : $wgRequest->getText('mime');
    $wgOut->addHTML(Xml::openElement('form', array('id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgTitle->getLocalUrl())) . Xml::inputLabel(wfMsg('mimetype'), 'mime', 'mime', 20, $mime) . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('form'));
    list($major, $minor) = wfSpecialMIMEsearchParse($mime);
    if ($major == '' or $minor == '' or !wfSpecialMIMEsearchValidType($major)) {
        return;
    }
    $wpp = new MIMEsearchPage($major, $minor);
    list($limit, $offset) = wfCheckLimits();
    $wpp->doQuery($offset, $limit);
}
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:16,代码来源:SpecialMIMEsearch.php

示例12: makeForm

 /**
  * Generate a form to allow users to enter an ISBN
  *
  * @return string
  */
 private function makeForm()
 {
     global $wgScript;
     $title = self::getTitleFor('Booksources');
     $form = '<fieldset><legend>' . wfMsgHtml('booksources-search-legend') . '</legend>';
     $form .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript));
     $form .= Xml::hidden('title', $title->getPrefixedText());
     $form .= '<p>' . Xml::inputLabel(wfMsg('booksources-isbn'), 'isbn', 'isbn', 20, $this->isbn);
     $form .= '&nbsp;' . Xml::submitButton(wfMsg('booksources-go')) . '</p>';
     $form .= Xml::closeElement('form');
     $form .= '</fieldset>';
     return $form;
 }
开发者ID:negabaro,项目名称:alfresco,代码行数:18,代码来源:SpecialBooksources.php

示例13: makeFilterForm

 function makeFilterForm()
 {
     $filterForm = Xml::openElement('form', array('method' => 'get', 'action' => $this->getConfig()->get('Script')));
     $filterForm .= Xml::openElement('fieldset') . Xml::element('legend', null, $this->msg('approvedrevs-filter-legend')->text()) . Html::hidden('title', $this->getTitle()->getPrefixedText()) . Xml::inputLabel($this->msg('approvedrevs-filter-field-org')->text(), 'organization', 'filter-field-org', null, $this->mOrganization) . ' ';
     /*
                     Xml::inputLabel(
                         $this->msg('approvedrevs-filter-field-group' )->text(),
                         'group', 'filter-field-group', null, $group ) . ' ' .
     */
     $filterForm .= $this->getModeSelector();
     $filterForm .= Xml::submitButton($this->msg('approvedrevs-filter-field-submit')->text()) . Xml::closeElement('fieldset') . Xml::closeElement('form');
     return $filterForm;
 }
开发者ID:kolzchut,项目名称:mediawiki-extensions-WRApprovedRevs,代码行数:13,代码来源:SpecialApprovedRevs.php

示例14: switchForm

 /**
  * Output a form to allow searching for a user
  */
 function switchForm()
 {
     global $wgScript;
     $knownwiki = $this->getRequest()->getVal('wpKnownWiki');
     $knownwiki = $knownwiki ? $knownwiki : wfWikiId();
     // Generate wiki selector
     $selector = new XmlSelect('wpKnownWiki', 'wpKnownWiki', $knownwiki);
     foreach (CentralAuthUser::getWikiList() as $wiki) {
         $selector->addOption($wiki);
     }
     $this->getOutput()->addModuleStyles('mediawiki.special');
     $this->getOutput()->addHTML(Xml::openElement('form', array('method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1')) . Html::hidden('title', $this->getTitle()) . Xml::openElement('fieldset') . Xml::element('legend', array(), wfMsg('userrights-lookup-user')) . Xml::inputLabel(wfMsg('userrights-user-editname'), 'user', 'username', 30, $this->mTarget) . ' <br />' . Xml::label(wfMsg('centralauth-globalgrouppermissions-knownwiki'), 'wpKnownWiki') . ' ' . $selector->getHTML() . '<br />' . Xml::submitButton(wfMsg('editusergroup')) . Xml::closeElement('fieldset') . Xml::closeElement('form') . "\n");
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:16,代码来源:SpecialGlobalGroupMembership.php

示例15: showForm

 function showForm()
 {
     global $wgOut;
     $wgOut->setPagetitle(wfMsg("player-title"));
     $wgOut->addWikiText(wfMsg("player-pagetext"));
     $titleObj = SpecialPage::getTitleFor("Player");
     $action = $titleObj->getLocalURL("action=submit");
     $wgOut->addHTML(Xml::openElement('form', array('id' => 'player', 'method' => 'post', 'action' => $action)));
     $wgOut->addHTML('<div>');
     $wgOut->addHTML(Xml::inputLabel(wfMsg('player-file'), 'playfile', 'playfile'));
     $wgOut->addHTML(' ');
     $wgOut->addHTML(Xml::submitButton(wfMsg('player-play')));
     $wgOut->addHTML('</div>');
     $wgOut->addHTML(Xml::closeElement('form'));
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:15,代码来源:SpecialPlayer.php


注:本文中的Xml::inputLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。