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


PHP Html::hidden方法代码示例

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


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

示例1: 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

示例2: getForm

	/**
	 * Returns HTML5 output of the form
	 * GLOBALS: $wgLang, $wgScript
	 * @return string
	 */
	protected function getForm() {
		global $wgLang, $wgScript;

		$form = Xml::tags( 'form',
			array(
				'action' => $wgScript,
				'method' => 'get'
			),

			'<table><tr><td>' .
				wfMsgHtml( 'translate-page-language' ) .
			'</td><td>' .
				TranslateUtils::languageSelector( $wgLang->getCode(), $this->options['language'] ) .
			'</td></tr><tr><td>' .
				wfMsgHtml( 'translate-magic-module' ) .
			'</td><td>' .
				$this->moduleSelector( $this->options['module'] ) .
			'</td></tr><tr><td colspan="2">' .
				Xml::submitButton( wfMsg( 'translate-magic-submit' ) ) . ' ' .
				Xml::submitButton( wfMsg( 'translate-magic-cm-export' ), array( 'name' => 'export' ) ) .
			'</td></tr></table>' .
			Html::hidden( 'title', $this->getTitle()->getPrefixedText() )
		);
		return $form;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:30,代码来源:SpecialMagic.php

示例3: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE)
 {
     echo "<div class='firstbloc'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         $profile = new Profile();
         echo "<form method='post' action='" . $profile->getFormURL() . "'>";
     }
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     $rights = array(array('itemtype' => 'PluginAddressingAddressing', 'label' => __('Generate reports', 'addressing'), 'field' => 'plugin_addressing'));
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('General')));
     echo "<table class='tab_cadre_fixehov'>";
     $effective_rights = ProfileRight::getProfileRights($profiles_id, array('plugin_addressing_use_ping_in_equipment'));
     echo "<tr class='tab_bg_2'>";
     echo "<td width='20%'>" . __('Use ping on equipment form', 'addressing') . "</td>";
     echo "<td colspan='5'>";
     Html::showCheckbox(array('name' => '_plugin_addressing_use_ping_in_equipment[1_0]', 'checked' => $effective_rights['plugin_addressing_use_ping_in_equipment']));
     echo "</td></tr>\n";
     echo "</table>";
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:36,代码来源:profile.class.php

示例4: showForm

 function showForm()
 {
     $this->getfromDB(1);
     $target = self::getFormURL();
     echo "<div align='center'><form method='post'  action=\"{$target}\">";
     echo "<table class='tab_cadre' cellpadding='5'><tr ><th colspan='2'>";
     echo self::getTypeName(0) . "</th></tr>";
     echo "<tr class='tab_bg_1'><td>";
     echo "<select name=\"unit\" size=\"1\"> ";
     echo "<option ";
     if ($this->isMetricUnit()) {
         echo "selected ";
     }
     echo "value='" . self::METRIC_UNIT . "'>" . __('metric', 'racks') . "</option>";
     echo "<option ";
     if (!$this->isMetricUnit()) {
         echo "selected ";
     }
     echo "value='" . self::NON_METRIC_UNIT . "'>" . __('English', 'racks') . "</option>";
     echo "</select> ";
     echo "</td>";
     echo "<td>";
     echo Html::hidden('id', array('value' => 1));
     echo Html::submit(_sx('button', 'Post'), array('name' => 'update'));
     echo "</table>";
     Html::closeForm();
     echo "</div>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:28,代码来源:config.class.php

示例5: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE)
 {
     echo "<div class='firstbloc'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         $profile = new Profile();
         echo "<form method='post' action='" . $profile->getFormURL() . "'>";
     }
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     if ($profile->getField('interface') == 'central') {
         $rights = $this->getAllRights();
         $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('General')));
     }
     echo "<table class='tab_cadre_fixehov'>";
     echo "<tr class='tab_bg_1'><th colspan='4'>" . __('Helpdesk') . "</th></tr>\n";
     $effective_rights = ProfileRight::getProfileRights($profiles_id, array('plugin_racks_open_ticket'));
     echo "<tr class='tab_bg_2'>";
     echo "<td width='20%'>" . __('Associable items to a ticket') . "</td>";
     echo "<td colspan='5'>";
     Html::showCheckbox(array('name' => '_plugin_racks_open_ticket', 'checked' => $effective_rights['plugin_racks_open_ticket']));
     echo "</td></tr>\n";
     echo "</table>";
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:39,代码来源:profile.class.php

示例6: notificator_Render

 public static function notificator_Render($parser, $receiver = '', $receiverLabel = '')
 {
     global $wgScript, $wgTitle;
     if (!$receiverLabel) {
         $receiverLabel = $receiver;
     }
     // Check that the database table is in place
     if (!Notificator::checkDatabaseTableExists()) {
         $output = '<span class="error">' . htmlspecialchars(wfMsg('notificator-db-table-does-not-exist')) . '</span>';
         return array($output, 'noparse' => true, 'isHTML' => true);
     }
     // The rendering is different, depending on whether a valid e-mail address
     // has been provided, or not - the differing part of the HTML form is being
     // built here
     if (Notificator::receiverIsValid($receiver)) {
         // Valid e-mail address available, so build a hidden input with that address
         // set, and a button
         $receiverInputAndSubmitButton = Html::hidden('receiver', $receiver) . Html::element('input', array('type' => 'submit', 'value' => wfMsg('notificator-notify-address-or-name', $receiverLabel)));
     } else {
         // No (valid) e-mail address available, build a text input and a button
         $receiverInputAndSubmitButton = Html::element('input', array('type' => 'text', 'name' => 'receiver', 'value' => wfMsg('notificator-e-mail-address'), 'onfocus' => 'if (this.value == \'' . wfMsg('notificator-e-mail-address') . '\') {this.value=\'\'}')) . Html::element('input', array('type' => 'submit', 'value' => wfMsg('notificator-notify')));
     }
     // Now we assemble the form, consisting of two hidden inputs for page ID and rev ID,
     // as well as the $receiverInputAndSubmitButton built above
     $output = Html::rawElement('form', array('action' => SpecialPage::getTitleFor('Notificator')->getLocalURL(), 'method' => 'post', 'enctype' => 'multipart/form-data'), Html::hidden('pageId', $wgTitle->getArticleID()) . Html::hidden('revId', $wgTitle->getLatestRevID()) . $receiverInputAndSubmitButton);
     return $parser->insertStripItem($output, $parser->mStripState);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:27,代码来源:Notificator.body.php

示例7: showForm

 public function showForm()
 {
     global $wgScript;
     // Text to explain level select (if there are several levels)
     if (FlaggedRevs::qualityVersions()) {
         $this->getOutput()->addWikiMsg('reviewedpages-list', $this->getLanguage()->formatNum($this->pager->getNumRows()));
     }
     $form = Html::openElement('form', array('name' => 'reviewedpages', 'action' => $wgScript, 'method' => 'get'));
     $form .= "<fieldset><legend>" . $this->msg('reviewedpages-leg')->escaped() . "</legend>\n";
     // show/hide links
     $showhide = array($this->msg('show')->escaped(), $this->msg('hide')->escaped());
     $onoff = 1 - $this->hideRedirs;
     $link = Linker::link($this->getPageTitle(), $showhide[$onoff], array(), array('hideredirs' => $onoff, 'namespace' => $this->namespace));
     $showhideredirs = $this->msg('whatlinkshere-hideredirs')->rawParams($link)->escaped();
     $fields = array();
     $namespaces = FlaggedRevs::getReviewNamespaces();
     if (count($namespaces) > 1) {
         $fields[] = FlaggedRevsXML::getNamespaceMenu($this->namespace) . ' ';
     }
     if (FlaggedRevs::qualityVersions()) {
         $fields[] = FlaggedRevsXML::getLevelMenu($this->type) . ' ';
     }
     $form .= implode(' ', $fields) . ' ';
     $form .= $showhideredirs;
     if (count($fields)) {
         $form .= " " . Xml::submitButton($this->msg('go')->text());
     }
     $form .= Html::hidden('title', $this->getPageTitle()->getPrefixedDBKey()) . "\n";
     $form .= "</fieldset>";
     $form .= Html::closeElement('form ') . "\n";
     $this->getOutput()->addHTML($form);
 }
开发者ID:crippsy14,项目名称:orange-smorange,代码行数:32,代码来源:ReviewedPages_body.php

示例8: 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

示例9: addRequestWikiForm

 function addRequestWikiForm()
 {
     $localpage = $this->getPageTitle()->getLocalUrl();
     $form = Xml::openElement('form', array('action' => $localpage, 'method' => 'post'));
     $form .= '<fieldset><legend>' . $this->msg('requestwiki')->escaped() . '</legend>';
     $form .= Xml::openElement('table');
     $form .= '<tr><td>' . $this->msg('requestwiki-label-siteurl')->escaped() . '</td>';
     $form .= '<td>' . Xml::input('subdomain', 20, '') . '.miraheze.org' . '</td></tr>';
     $form .= '<tr><td>' . $this->msg('requestwiki-label-sitename')->escaped() . '</td>';
     $form .= '<td>' . Xml::input('sitename', 20, '', array('required' => '')) . '</td></tr>';
     $form .= '<tr><td>' . $this->msg('requestwiki-label-customdomain')->escaped() . '</td>';
     $form .= '<td>' . Xml::input('customdomain', 20, '') . '</td></tr>';
     $form .= '<tr><td>' . $this->msg('requestwiki-label-language')->escaped() . '</td>';
     $form .= '<td>' . Xml::languageSelector('en', true, null, array('name' => 'language'))[1] . '</td></tr>';
     $form .= '<tr><td>' . $this->msg('requestwiki-label-private')->escaped() . '</td>';
     $form .= '<td>' . Xml::check('private', false, array('value' => 0)) . '</td></tr>';
     $form .= '<tr><td>' . $this->msg('requestwiki-label-comments')->escaped() . '</td>';
     $form .= '<td>' . Xml::textarea('comments', '', 40, 5, array('required' => '')) . '</td></tr>';
     $form .= '<tr><td>' . Xml::submitButton($this->msg('requestwiki-submit')->plain()) . '</td></tr>';
     $form .= Xml::closeElement('table');
     $form .= '</fieldset>';
     $form .= Html::hidden('token', $this->getUser()->getEditToken());
     $form .= Xml::closeElement('form');
     $this->getOutput()->addHTML($form);
 }
开发者ID:Reception123,项目名称:CreateWiki,代码行数:25,代码来源:SpecialRequestWiki.php

示例10: showForm

 public function showForm()
 {
     global $wgScript;
     # Explanatory text
     $this->getOutput()->addWikiMsg('pendingchanges-list', $this->getLang()->formatNum($this->pager->getNumRows()));
     $form = Html::openElement('form', array('name' => 'pendingchanges', 'action' => $wgScript, 'method' => 'get')) . "\n";
     $form .= "<fieldset><legend>" . wfMsgHtml('pendingchanges-legend') . "</legend>\n";
     $form .= Html::hidden('title', $this->getTitle()->getPrefixedDBKey()) . "\n";
     $items = array();
     if (count(FlaggedRevs::getReviewNamespaces()) > 1) {
         $items[] = "<span style='white-space: nowrap;'>" . FlaggedRevsXML::getNamespaceMenu($this->namespace, '') . '</span>';
     }
     if (FlaggedRevs::qualityVersions()) {
         $items[] = "<span style='white-space: nowrap;'>" . FlaggedRevsXML::getLevelMenu($this->level, 'revreview-filter-stable') . '</span>';
     }
     if (!FlaggedRevs::isStableShownByDefault() && !FlaggedRevs::useOnlyIfProtected()) {
         $items[] = "<span style='white-space: nowrap;'>" . Xml::check('stable', $this->stable, array('id' => 'wpStable')) . Xml::label(wfMsg('pendingchanges-stable'), 'wpStable') . '</span>';
     }
     if ($items) {
         $form .= implode(' ', $items) . '<br />';
     }
     $items = array();
     $items[] = Xml::label(wfMsg("pendingchanges-category"), 'wpCategory') . '&#160;' . Xml::input('category', 30, $this->category, array('id' => 'wpCategory'));
     if ($this->getUser()->getId()) {
         $items[] = Xml::check('watched', $this->watched, array('id' => 'wpWatched')) . Xml::label(wfMsg('pendingchanges-onwatchlist'), 'wpWatched');
     }
     $form .= implode(' ', $items) . '<br />';
     $form .= Xml::label(wfMsg('pendingchanges-size'), 'wpSize') . Xml::input('size', 4, $this->size, array('id' => 'wpSize')) . ' ' . Xml::submitButton(wfMsg('allpagessubmit')) . "\n";
     $form .= "</fieldset>";
     $form .= Html::closeElement('form') . "\n";
     $this->getOutput()->addHTML($form);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:32,代码来源:PendingChanges_body.php

示例11: execute

 public function execute($parameters)
 {
     global $wgOut, $wgRequest, $wgDisableTextSearch, $wgScript;
     $this->setHeaders();
     list($limit, $offset) = wfCheckLimits();
     $wgOut->addWikiText(wfMsgForContentNoTrans('proofreadpage_specialpage_text'));
     $this->searchList = null;
     $this->searchTerm = $wgRequest->getText('key');
     $this->suppressSqlOffset = false;
     if (!$wgDisableTextSearch) {
         $self = $this->getTitle();
         $wgOut->addHTML(Xml::openElement('form', array('action' => $wgScript)) . Html::hidden('title', $this->getTitle()->getPrefixedText()) . Xml::input('limit', false, $limit, array('type' => 'hidden')) . Xml::openElement('fieldset') . Xml::element('legend', null, wfMsg('proofreadpage_specialpage_legend')) . Xml::input('key', 20, $this->searchTerm) . ' ' . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('fieldset') . Xml::closeElement('form'));
         if ($this->searchTerm) {
             $index_namespace = $this->index_namespace;
             $index_ns_index = MWNamespace::getCanonicalIndex(strtolower(str_replace(' ', '_', $index_namespace)));
             $searchEngine = SearchEngine::create();
             $searchEngine->setLimitOffset($limit, $offset);
             $searchEngine->setNamespaces(array($index_ns_index));
             $searchEngine->showRedirects = false;
             $textMatches = $searchEngine->searchText($this->searchTerm);
             $escIndex = preg_quote($index_namespace, '/');
             $this->searchList = array();
             while ($result = $textMatches->next()) {
                 $title = $result->getTitle();
                 if ($title->getNamespace() == $index_ns_index) {
                     array_push($this->searchList, $title->getDBkey());
                 }
             }
             $this->suppressSqlOffset = true;
         }
     }
     parent::execute($parameters);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:33,代码来源:SpecialProofreadPages.php

示例12: hiddenField

	/**
	 * Helper function to display a hidden field for different versions
	 * of MediaWiki.
	 */
	static function hiddenField( $name, $value ) {
		if ( class_exists( 'Html' ) ) {
			return "\t" . Html::hidden( $name, $value ) . "\n";
		} else {
			return "\t" . Xml::hidden( $name, $value ) . "\n";
		}
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:11,代码来源:SpecialReplaceText.php

示例13: showForm

 protected function showForm()
 {
     global $wgScript;
     # Explanatory text
     $this->getOutput()->addWikiMsg('configuredpages-list', $this->getLang()->formatNum($this->pager->getNumRows()));
     $fields = array();
     # Namespace selector
     if (count(FlaggedRevs::getReviewNamespaces()) > 1) {
         $fields[] = FlaggedRevsXML::getNamespaceMenu($this->namespace, '');
     }
     # Default version selector
     $fields[] = FlaggedRevsXML::getDefaultFilterMenu($this->override);
     # Restriction level selector
     if (FlaggedRevs::getRestrictionLevels()) {
         $fields[] = FlaggedRevsXML::getRestrictionFilterMenu($this->autoreview);
     }
     $form = Html::openElement('form', array('name' => 'configuredpages', 'action' => $wgScript, 'method' => 'get'));
     $form .= Html::hidden('title', $this->getTitle()->getPrefixedDBKey());
     $form .= "<fieldset><legend>" . wfMsg('configuredpages') . "</legend>\n";
     $form .= implode('&#160;', $fields) . '<br/>';
     $form .= Xml::submitButton(wfMsg('go'));
     $form .= "</fieldset>\n";
     $form .= Html::closeElement('form') . "\n";
     $this->getOutput()->addHTML($form);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:25,代码来源:ConfiguredPages_body.php

示例14: showList

 function showList($conds = array('af_deleted' => 0), $optarray = array())
 {
     global $wgAbuseFilterCentralDB, $wgAbuseFilterIsCentral;
     $output = '';
     $output .= Xml::element('h2', null, $this->msg('abusefilter-list')->parse());
     $pager = new AbuseFilterPager($this, $conds);
     $deleted = $optarray['deleted'];
     $hidedisabled = $optarray['hidedisabled'];
     $scope = $optarray['scope'];
     # Options form
     $fields = array();
     $fields['abusefilter-list-options-deleted'] = Xml::radioLabel($this->msg('abusefilter-list-options-deleted-show')->text(), 'deletedfilters', 'show', 'mw-abusefilter-deletedfilters-show', $deleted == 'show') . Xml::radioLabel($this->msg('abusefilter-list-options-deleted-hide')->text(), 'deletedfilters', 'hide', 'mw-abusefilter-deletedfilters-hide', $deleted == 'hide') . Xml::radioLabel($this->msg('abusefilter-list-options-deleted-only')->text(), 'deletedfilters', 'only', 'mw-abusefilter-deletedfilters-only', $deleted == 'only');
     if (isset($wgAbuseFilterCentralDB) && !$wgAbuseFilterIsCentral) {
         $fields['abusefilter-list-options-scope'] = Xml::radioLabel($this->msg('abusefilter-list-options-scope-local')->text(), 'rulescope', 'local', 'mw-abusefilter-rulescope-local', $scope == 'local') . Xml::radioLabel($this->msg('abusefilter-list-options-scope-global')->text(), 'rulescope', 'global', 'mw-abusefilter-rulescope-global', $scope == 'global');
     }
     $fields['abusefilter-list-options-disabled'] = Xml::checkLabel($this->msg('abusefilter-list-options-hidedisabled')->text(), 'hidedisabled', 'mw-abusefilter-disabledfilters-hide', $hidedisabled);
     $fields['abusefilter-list-limit'] = $pager->getLimitSelect();
     $options = Xml::buildForm($fields, 'abusefilter-list-options-submit');
     $options .= Html::hidden('title', $this->getTitle()->getPrefixedText());
     $options = Xml::tags('form', array('method' => 'get', 'action' => $this->getTitle()->getFullURL()), $options);
     $options = Xml::fieldset($this->msg('abusefilter-list-options')->text(), $options);
     $output .= $options;
     if (isset($wgAbuseFilterCentralDB) && !$wgAbuseFilterIsCentral && $scope == 'global') {
         $globalPager = new GlobalAbuseFilterPager($this, $conds);
         $output .= $globalPager->getNavigationBar() . $globalPager->getBody() . $globalPager->getNavigationBar();
     } else {
         $output .= $pager->getNavigationBar() . $pager->getBody() . $pager->getNavigationBar();
     }
     $this->getOutput()->addHTML($output);
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:30,代码来源:AbuseFilterViewList.php

示例15: getHTML

 public static function getHTML($cur_value, $input_name, $is_mandatory, $is_disabled, $other_args)
 {
     global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
     $checkbox_class = $is_mandatory ? 'mandatoryField' : 'createboxInput';
     $span_class = 'checkboxSpan';
     if (array_key_exists('class', $other_args)) {
         $span_class .= ' ' . $other_args['class'];
     }
     $input_id = "input_{$sfgFieldNum}";
     // get list delimiter - default is comma
     if (array_key_exists('delimiter', $other_args)) {
         $delimiter = $other_args['delimiter'];
     } else {
         $delimiter = ',';
     }
     $cur_values = SFUtils::getValuesArray($cur_value, $delimiter);
     if (($possible_values = $other_args['possible_values']) == null) {
         $possible_values = array();
     }
     $text = '';
     foreach ($possible_values as $key => $possible_value) {
         $cur_input_name = $input_name . '[' . $key . ']';
         if (array_key_exists('value_labels', $other_args) && is_array($other_args['value_labels']) && array_key_exists($possible_value, $other_args['value_labels'])) {
             $label = $other_args['value_labels'][$possible_value];
         } else {
             $label = $possible_value;
         }
         $checkbox_attrs = array('id' => $input_id, 'tabindex' => $sfgTabIndex, 'class' => $checkbox_class);
         if (in_array($possible_value, $cur_values)) {
             $checkbox_attrs['checked'] = 'checked';
         }
         if ($is_disabled) {
             $checkbox_attrs['disabled'] = 'disabled';
         }
         $checkbox_input = Html::input($cur_input_name, $possible_value, 'checkbox', $checkbox_attrs);
         // Make a span around each checkbox, for CSS purposes.
         $text .= "\t" . Html::rawElement('span', array('class' => $span_class), $checkbox_input . ' ' . $label) . "\n";
         $sfgTabIndex++;
         $sfgFieldNum++;
     }
     $outerSpanID = "span_{$sfgFieldNum}";
     $outerSpanClass = 'checkboxesSpan';
     if ($is_mandatory) {
         $outerSpanClass .= ' mandatoryFieldSpan';
     }
     if (array_key_exists('show on select', $other_args)) {
         $outerSpanClass .= ' sfShowIfChecked';
         foreach ($other_args['show on select'] as $div_id => $options) {
             if (array_key_exists($outerSpanID, $sfgShowOnSelect)) {
                 $sfgShowOnSelect[$outerSpanID][] = array($options, $div_id);
             } else {
                 $sfgShowOnSelect[$outerSpanID] = array(array($options, $div_id));
             }
         }
     }
     $text .= Html::hidden($input_name . '[is_list]', 1);
     $outerSpanAttrs = array('id' => $outerSpanID, 'class' => $outerSpanClass);
     $text = "\t" . Html::rawElement('span', $outerSpanAttrs, $text) . "\n";
     return $text;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:60,代码来源:SF_CheckboxesInput.php


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