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


PHP Xml::inputLabelSep方法代码示例

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


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

示例1: userForm

 public static function userForm(&$items, $opts)
 {
     $opts->consumeValue('users');
     global $wgRequest;
     $default = $wgRequest->getVal('users', '');
     $items['users'] = Xml::inputLabelSep(wfMsg('cleanchanges-users'), 'users', 'mw-users', 40, $default);
     return true;
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:8,代码来源:Filters.php

示例2: categoryFilterForm

 /**
  * Create an input to filter changes by categories
  *
  * @param FormOptions $opts
  * @return array
  */
 protected function categoryFilterForm(FormOptions $opts)
 {
     list($label, $input) = Xml::inputLabelSep($this->msg('rc_categories')->text(), 'categories', 'mw-categories', false, $opts['categories']);
     $input .= ' ' . Xml::checkLabel($this->msg('rc_categories_any')->text(), 'categories_any', 'mw-categories_any', $opts['categories_any']);
     return array($label, $input);
 }
开发者ID:mb720,项目名称:mediawiki,代码行数:12,代码来源:SpecialRecentchanges.php

示例3: addInputLabel

	/**
	 * Shortcut for keeping the code at least a bit readable. Adds label and input into $form array.
	 * @param $form \list{String} Array where input element and label is appended.
	 * @param $label \string Label text.
	 * @param $name \string Name attribute.
	 * @param $size \int Size attribute of the input element. Default false.
	 * @param $text \string Text of the value attribute. Default false.
	 * @param $attribs \array Extra attributes. Default empty array.
	 */
	protected function addInputLabel( &$form, $label, $name, $size = false , $text = false, $attribs = array() ) {
		$br = Html::element( 'br' );
		list( $label, $input ) = Xml::inputLabelSep( $label, $name, $name, $size, $text, $attribs );
		$form[] = $label . $br;
		$form[] = $input . $br;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:15,代码来源:SpecialPageTranslationDeletePage.php

示例4: getQueryFormFields

	/**
	 * Returns query form fields.
	 * @param $opts Form options.
	 * @return Array of form fields.
	 */
	protected static function getQueryFormFields( FormOptions $opts ) {
		global $wgWikilogEnableTags;

		$fields = array();

		$fields['wikilog'] = Xml::inputLabelSep(
			wfMsg( 'wikilog-form-wikilog' ), 'wikilog', 'wl-wikilog', 40,
			str_replace( '_', ' ', $opts->consumeValue( 'wikilog' ) )
		);

		$fields['category'] = Xml::inputLabelSep(
			wfMsg( 'wikilog-form-category' ), 'category', 'wl-category', 40,
			str_replace( '_', ' ', $opts->consumeValue( 'category' ) )
		);

		$fields['author'] = Xml::inputLabelSep(
			wfMsg( 'wikilog-form-author' ), 'author', 'wl-author', 40,
			str_replace( '_', ' ', $opts->consumeValue( 'author' ) )
		);

		if ( $wgWikilogEnableTags ) {
			$fields['tag'] = Xml::inputLabelSep(
				wfMsg( 'wikilog-form-tag' ), 'tag', 'wl-tag', 40,
				str_replace( '_', ' ', $opts->consumeValue( 'tag' ) )
			);
		}

		$fields['date'] = array(
			Xml::label( wfMsg( 'wikilog-form-date' ), 'wl-month' ),
			Xml::monthSelector( $opts->consumeValue( 'month' ), '', 'wl-month' ) .
				" " . Xml::input( 'year', 4, $opts->consumeValue( 'year' ), array( 'maxlength' => 4 ) )
		);
		$opts->consumeValue( 'day' );	// ignore day, not really useful

		$statusSelect = new XmlSelect( 'show', 'wl-status', $opts->consumeValue( 'show' ) );
		$statusSelect->addOption( wfMsg( 'wikilog-show-all' ), 'all' );
		$statusSelect->addOption( wfMsg( 'wikilog-show-published' ), 'published' );
		$statusSelect->addOption( wfMsg( 'wikilog-show-drafts' ), 'drafts' );
		$fields['status'] = array(
			Xml::label( wfMsg( 'wikilog-form-status' ), 'wl-status' ),
			$statusSelect->getHTML()
		);

		$fields['submit'] = Xml::submitbutton( wfMsg( 'allpagessubmit' ) );
		return $fields;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:51,代码来源:SpecialWikilog.php

示例5: getPoSortFormBox


//.........这里部分代码省略.........
            }
            if (array_key_exists($key, $mainColumnLabels)) {
                /*
                 * Make an element for main column aka query-matches
                 */
                $result .= Html::openElement('div', array('id' => "sort_div_{$i}", 'class' => 'smwsort')) . '<span class="smwquisortlabel">' . '<span class="smw-remove">' . Html::openelement('a', array('href' => "javascript:removePOInstance('sort_div_{$i}')")) . '<img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMessage('smw_qui_delete')->text() . '">' . '</a>' . '</span><strong>' . wfMessage('smw_qui_rescol')->text() . '</strong></span>' . Html::hidden("maincol_label[{$i}]", $mainColumnLabels[$key], array('id' => "maincol_label{$i}")) . " " . '<a class="smwq-more" href="javascript:smw_makeQueryMatchesDialog(\'' . $i . '\')">' . wfMessage('smw_qui_options')->text() . '</a> ' . '</div>';
                $urlArgs["maincol_label[{$i}]"] = $mainColumnLabels[$key] === '' ? ' ' : $mainColumnLabels[$key];
                $i++;
            }
        }
        $numSortValues = $i;
        $this->setUrlArgs($urlArgs);
        // END: create form elements already submitted earlier via form
        // create hidden form elements to be cloned later
        // property
        $hiddenProperty = Html::openElement('div', array('id' => 'property_starter', 'style' => 'display:none')) . '<span class="smwquisortlabel">' . '<span class="smw-remove">' . '<a>' . '<img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMessage('smw_qui_delete')->text() . '">' . '</a>' . '</span>' . wfMessage('smw_qui_property')->text() . '</span>' . Xml::input('property_num', '25') . " ";
        if ($smwgQSortingSupport) {
            $hiddenProperty .= Html::openElement('select', array('name' => 'order_num')) . Xml::option(wfMessage('smw_qui_nosort')->text(), 'NONE') . Xml::option(wfMessage('smw_qui_ascorder')->text(), 'ASC') . Xml::option(wfMessage('smw_qui_descorder')->text(), 'DESC');
            if ($smwgQRandSortingSupport) {
                $hiddenProperty .= Xml::option(wfMessage('smw_qui_randorder')->text(), 'RANDOM');
            }
            $hiddenProperty .= Xml::closeElement('select') . Xml::checkLabel(wfMessage('smw_qui_shownresults')->text(), "display_num", '', true);
        }
        $hiddenProperty .= Html::hidden('prop_label_num', '') . Html::hidden('prop_format_num', '') . Html::hidden('prop_limit_num', '') . Xml::closeElement('div');
        $hiddenProperty = json_encode($hiddenProperty);
        // category
        $hiddenCategory = Html::openElement('div', array('id' => 'category_starter', 'style' => 'display:none')) . '<span class="smwquisortlabel">' . '<span class="smw-remove">' . '<a>' . '<img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMessage('smw_qui_delete')->text() . '">' . '</a>' . '</span>' . wfMessage('smw_qui_category')->text() . '</span>' . Xml::input("category_num", '25') . " " . '<input type="hidden" name="cat_label_num" />' . '<input type="hidden" name="cat_yes_num" />' . '<input type="hidden" name="cat_no_num" />' . Xml::closeElement('div');
        $hiddenCategory = json_encode($hiddenCategory);
        // For '?' printouts
        $hiddenMainColumn = Html::openElement('div', array('id' => 'maincol_starter', 'style' => 'display:none')) . '<span class="smwquisortlabel">' . '<span class="smw-remove">' . '<a>' . '<img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMessage('smw_qui_delete')->text() . '">' . '</a>' . '</span><strong>' . wfMessage('smw_qui_rescol')->text() . '</strong></span>' . Html::hidden("maincol_label_num", '') . " " . Xml::closeElement('div');
        $hiddenMainColumn = json_encode($hiddenMainColumn);
        // Create dialog-boxes
        // create dialogbox for Property options
        $propertyHtml = Xml::inputLabelSep(wfMessage('smw_qui_prop')->text(), '', 'd-property', 'd-property');
        $propertyLabelHtml = Xml::inputLabelSep(wfMessage('smw_qui_labl')->text(), '', 'd-prop-label', 'd-prop-label');
        $propertyFormatHtml = Xml::inputLabelSep(wfMessage('smw_qui_formt')->text(), '', 'd-prop-format', 'd-prop-format');
        $propertyLimitHtml = Xml::inputLabelSep(wfMessage('smw_qui_limt')->text(), 'd-prop-limit', 'd-prop-limit');
        $propertyDialogBox = Xml::openElement('div', array('id' => 'prop-dialog', 'title' => wfMessage('smw_prp_options')->text(), 'class' => 'smwpropdialog')) . '<table align="center">' . '<tr><td>' . $propertyHtml[0] . '</td><td>' . $propertyHtml[1] . '</td></tr>' . '<tr><td>' . $propertyLabelHtml[0] . '</td><td>' . $propertyLabelHtml[1] . '</td></tr>' . '<tr><td>' . $propertyLimitHtml[0] . '</td><td>' . $propertyLimitHtml[1] . '</td></tr>' . '<tr><td>' . $propertyFormatHtml[0] . '</td><td>' . $propertyFormatHtml[1] . '</td></tr>' . '</table>' . Xml::closeElement('div');
        // create dialogbox for Category options
        $categoryHtml = Xml::inputLabelSep(wfMessage('smw_qui_dcategory')->text(), '', 'd-category', 'd-category');
        $categoryLabelHtml = Xml::inputLabelSep(wfMessage('smw_qui_dlabel')->text(), '', 'd-category-label', 'd-category-label');
        $categoryYesHtml = Xml::inputLabelSep(wfMessage('smw_qui_dcatyes')->text(), '', 'd-category-yes', 'd-category-yes');
        $categoryNoHtml = Xml::inputLabelSep(wfMessage('smw_qui_dcatno')->text(), '', 'd-category-no', 'd-category-no');
        $categoryDialogBox = Xml::openElement('div', array('id' => 'cat-dialog', 'title' => wfMessage('smw_qui_catopts')->text(), 'class' => 'smwcatdialog')) . '<table align="center">' . '<tr><td>' . $categoryHtml[0] . '</td><td>' . $categoryHtml[1] . '</td></tr>' . '<tr><td>' . $categoryLabelHtml[0] . '</td><td>' . $categoryLabelHtml[1] . '</td></tr>' . '</table><br/><table align="center">' . '<tr><td>' . $categoryYesHtml[0] . '</td><td>' . $categoryYesHtml[1] . '</td></tr>' . '<tr><td>' . $categoryNoHtml[0] . '</td><td>' . $categoryNoHtml[1] . '</td></tr>' . '</table>' . Xml::closeElement('div');
        // Create dialog box for QueryMatches
        $mainResLabelHtml = Xml::inputLabelSep(wfMessage('smw_qui_dlabel')->text(), '', 'd-mainres-label');
        $mainResDialogBox = Xml::openElement('div', array('id' => 'mainres-dialog', 'title' => wfMessage('smw_qui_mainlabopts')->text(), 'class' => 'smwmainlabdialog')) . '<table align="center">' . '<tr><td>' . $mainResLabelHtml[0] . '</td><td>' . $mainResLabelHtml[1] . '</td></tr>' . '</table>' . Xml::closeElement('div');
        $result .= '<div id="sorting_main"></div>' . "\n";
        $result .= '[<a href="javascript:smw_addPropertyInstance(\'property_starter\', \'sorting_main\')">' . wfMessage('smw_qui_addnprop')->text() . '</a>]' . '[<a href="javascript:smw_addCategoryInstance(\'category_starter\', \'sorting_main\')">' . wfMessage('smw_qui_addcategory')->text() . '</a>]' . '[<a href="javascript:smw_addMainColInstance(\'maincol_starter\', \'sorting_main\')">' . wfMessage('smw_qui_addrescol')->text() . '</a>]' . "\n";
        // Javascript code for handling adding and removing the "sort" inputs
        if ($enableAutocomplete == SMWQueryUI::ENABLE_AUTO_SUGGEST) {
            $this->enableAutocompletion();
        }
        // localisation messages for javascript
        $optionsMsg = wfMessage('smw_qui_options')->text();
        $okMsg = wfMessage('smw_qui_ok')->text();
        $cancelMsg = wfMessage('smw_qui_cancel')->text();
        $javascriptText = <<<EOT
<script type="text/javascript">
\tvar num_elements = {$numSortValues};
\tvar smwgQPrintoutLimit={$smwgQPrintoutLimit};
EOT;
        // add autocomplete
        if ($enableAutocomplete == SMWQueryUI::ENABLE_AUTO_SUGGEST) {
            $javascriptText .= <<<EOT
开发者ID:Tjorriemorrie,项目名称:app,代码行数:66,代码来源:SMW_QueryUI.php

示例6: priorityLanguagesForm

 /**
  * @param TranslatablePage $page
  */
 protected function priorityLanguagesForm(TranslatablePage $page)
 {
     global $wgContLang;
     $groupId = $page->getMessageGroupId();
     $this->getOutput()->wrapWikiMsg('==$1==', 'tpt-sections-prioritylangs');
     $langSelector = Xml::languageSelector($wgContLang->getCode(), false, $this->getLanguage()->getCode());
     $hLangs = Xml::inputLabelSep($this->msg('tpt-select-prioritylangs')->text(), 'prioritylangs', 'tpt-prioritylangs', 50, TranslateMetadata::get($groupId, 'prioritylangs'));
     $hForce = Xml::checkLabel($this->msg('tpt-select-prioritylangs-force')->text(), 'forcelimit', 'tpt-priority-forcelimit', TranslateMetadata::get($groupId, 'priorityforce') === 'on');
     $hReason = Xml::inputLabelSep($this->msg('tpt-select-prioritylangs-reason')->text(), 'priorityreason', 'tpt-priority-reason', 50, TranslateMetadata::get($groupId, 'priorityreason'));
     $this->getOutput()->addHTML("<table>" . "<tr>" . "<td class='mw-label'>{$hLangs['0']}</td>" . "<td class='mw-input'>{$hLangs['1']}{$langSelector['1']}</td>" . "</tr>" . "<tr><td></td><td class='mw-inout'>{$hForce}</td></tr>" . "<tr>" . "<td class='mw-label'>{$hReason['0']}</td>" . "<td class='mw-input'>{$hReason['1']}</td>" . "</tr>" . "</table>");
 }
开发者ID:HuijiWiki,项目名称:mediawiki-extensions-Translate,代码行数:14,代码来源:SpecialPageTranslation.php

示例7: printTranslations

	/**
	 * @param $filename string
	 */
	function printTranslations( $filename ){
		global $wgScript;
		
		$languages = Language::getLanguageNames();
		$languages['fallback'] = wfMsg( 'translatesvg-fallbackdesc');
		$languages['qqq'] = wfMsg( 'translatesvg-qqqdesc' );
		uksort($this->translations, "self::customsort");
			
		$this->getOutput()->addModules( 'ext.translateSvg' );
		$html = $this->thumb .
			Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'specialtranslatesvg' ) ) .
			Html::hidden( 'file', $filename ) .
			Html::hidden( 'step', 'translated' ) .
			Html::hidden( 'title', $this->getTitle()->getPrefixedText() );

		$groups = array();
		foreach( $this->translations as $language=>$translations ){
			$html .= Html::openElement( 'fieldset', array( 'id' => "mw-translatesvg-fieldset-$language" ) ) .
					Html::element( 'legend', null, $languages[$language] ) . 
					Html::openElement( 'div', array( 'class' => 'mw-collapsible mw-collapsed',
						'data-collapsetext' => wfMsg( 'translatesvg-toggle-hide' ),
						'data-expandtext' => wfMsg( 'translatesvg-toggle-view' ) ) );
			$groups = array();
			for( $i = 0; $i < $this->number; $i++ ){
				$fallback = $this->getFallback( $i );
				$existing = $this->getExisting( $i, $language );
				$desc = ( $language === 'qqq' ) ? '' : '&#160;' . Html::element( 'small', null, $this->getDescriptor( $i ) );
				list( $label, $input ) = Xml::inputLabelSep( $fallback['text'], "mw-translatesvg-$language-$i-text", "mw-translatesvg-$language-$i-text", 50, $existing['text'] );
				$grouphtml = $label . $desc . '&#160;&#160;&#160;' . $input;
				if( $language !== 'qqq' ){
					$grouphtml .= Html::element( 'br' ) .
							"&#160;&#160;&#160;" .
							Xml::inputLabel( wfMsg( 'translatesvg-xcoordinate-pre' ), "mw-translatesvg-$language-$i-x", "mw-translatesvg-$language-$i-x", 5, $existing['x'] ) .
							"&#160;&#160;&#160;" .
							Xml::inputLabel( wfMsg( 'translatesvg-ycoordinate-pre' ), "mw-translatesvg-$language-$i-y", "mw-translatesvg-$language-$i-y", 5, $existing['y'] );
				}
				$groups[] = $grouphtml;
			}
			$html .= implode( Html::element( 'div', array( 'style' => 'height:10px' ) ), $groups );
			$html .= Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' );
		}
		$html .= Xml::submitButton( wfMsg( 'translatesvg-submit' ) ) . "\n" .
				Html::closeElement( 'form' );
		$this->getOutput()->addHTML( $html );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:48,代码来源:SpecialTranslateSvg.php


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