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


PHP FunctionsEdit::radioButtons方法代码示例

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


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

示例1: config


//.........这里部分代码省略.........
</h2>

		<form class="form-horizontal" method="post" name="configform" action="module.php?mod=googlemap&mod_action=admin_config">
			<input type="hidden" name="action" value="update">
			<h3><?php 
        echo I18N::translate('Basic');
        ?>
</h3>

			<!-- GM_MAP_TYPE -->
			<div class="form-group">
				<label class="control-label col-sm-3" for="GM_MAP_TYPE">
					<?php 
        echo I18N::translate('Default map type');
        ?>
				</label>
				<div class="col-sm-9">
					<?php 
        $options = array('ROADMAP' => I18N::translate('Map'), 'SATELLITE' => I18N::translate('Satellite'), 'HYBRID' => I18N::translate('Hybrid'), 'TERRAIN' => I18N::translate('Terrain'));
        echo FunctionsEdit::selectEditControl('GM_MAP_TYPE', $options, null, $this->getSetting('GM_MAP_TYPE'), 'class="form-control"');
        ?>
				</div>
			</div>

			<!-- GM_USE_STREETVIEW -->
			<fieldset class="form-group">
				<legend class="control-label col-sm-3">
					<?php 
        echo I18N::translate('Google Street View™');
        ?>
				</legend>
				<div class="col-sm-9">
					<?php 
        echo FunctionsEdit::radioButtons('GM_USE_STREETVIEW', array(false => I18N::translate('hide'), true => I18N::translate('show')), $this->getSetting('GM_USE_STREETVIEW'), 'class="radio-inline"');
        ?>
				</div>
			</fieldset>

			<!-- GM_XSIZE / GM_YSIZE -->
			<fieldset class="form-group">
				<legend class="control-label col-sm-3">
					<?php 
        echo I18N::translate('Size of map (in pixels)');
        ?>
				</legend>
				<div class="col-sm-9">
					<div class="row">
						<div class="col-sm-6">
							<div class="input-group">
								<label class="input-group-addon" for="GM_XSIZE"><?php 
        echo I18N::translate('Width');
        ?>
</label>
								<input id="GM_XSIZE" class="form-control" type="text" name="GM_XSIZE" value="<?php 
        echo $this->getSetting('GM_XSIZE');
        ?>
">
							</div>
						</div>
						<div class="col-sm-6">
							<div class="input-group">
								<label class="input-group-addon" for="GM_YSIZE"><?php 
        echo I18N::translate('Height');
        ?>
</label>
								<input id="GM_YSIZE" class="form-control" type="text" name="GM_YSIZE" value="<?php 
开发者ID:bxbroze,项目名称:webtrees,代码行数:67,代码来源:GoogleMapsModule.php

示例2: records

    echo I18N::translate('When adding new close relatives, you can add source citations to the records (individual and family) or to the facts and events (birth, marriage, and death). This option controls whether records or facts will be selected by default.');
    ?>
			</p>
		</div>
	</fieldset>

	<!-- NO_UPDATE_CHAN -->
	<fieldset class="form-group">
		<legend class="control-label col-sm-3">
			<?php 
    echo I18N::translate('Keep the existing “last change” information');
    ?>
		</legend>
		<div class="col-sm-9">
			<?php 
    echo FunctionsEdit::radioButtons('NO_UPDATE_CHAN', $no_yes, $WT_TREE->getPreference('NO_UPDATE_CHAN'), 'class="radio-inline"');
    ?>
			<p class="small text-muted">
				<?php 
    echo I18N::translate('When a record is edited, the user and timestamp are recorded. Sometimes it is desirable to keep the existing “last change” information, for example when making minor corrections to someone else’s data. This option controls whether this feature is selected by default.');
    ?>
			</p>
		</div>
	</fieldset>

	<?php 
}
?>

	<div class="form-group">
		<div class="col-sm-offset-3 col-sm-9">
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:admin_trees_config.php

示例3: getOptionsForm

 /**
  * Generate a form to ask the user for options.
  *
  * @return string
  */
 public function getOptionsForm()
 {
     $descriptions = array('exact' => I18N::translate('Match the exact text, even if it occurs in the middle of a word.'), 'words' => I18N::translate('Match the exact text, unless it occurs in the middle of a word.'), 'wildcards' => I18N::translate('Use a “?” to match a single character, use “*” to match zero or more characters.'), 'regex' => I18N::translate('Regular expressions are an advanced pattern matching technique.') . '<br>' . I18N::translate('See %s for more information.', '<a href="http://php.net/manual/regexp.reference.php">php.net/manual/regexp.reference.php</a>'));
     return '<div class="form-group">' . '<label class="control-label col-sm-3">' . I18N::translate('Search text/pattern') . '</label>' . '<div class="col-sm-9">' . '<input class="form-control" name="search" size="40" value="' . Filter::escapeHtml($this->search) . '" onchange="this.form.submit();">' . '</div></div>' . '<div class="form-group">' . '<label class="control-label col-sm-3">' . I18N::translate('Replacement text') . '</label>' . '<div class="col-sm-9">' . '<input class="form-control" name="replace" size="40" value="' . Filter::escapeHtml($this->replace) . '" onchange="this.form.submit();"></td></tr>' . '</div></div>' . '<div class="form-group">' . '<label class="control-label col-sm-3">' . I18N::translate('Search method') . '</label>' . '<div class="col-sm-9">' . '<select class="form-control" name="method" onchange="this.form.submit();">' . '<option value="exact" ' . ($this->method == 'exact' ? 'selected' : '') . '>' . I18N::translate('Exact text') . '</option>' . '<option value="words" ' . ($this->method == 'words' ? 'selected' : '') . '>' . I18N::translate('Whole words only') . '</option>' . '<option value="wildcards" ' . ($this->method == 'wildcards' ? 'selected' : '') . '>' . I18N::translate('Wildcards') . '</option>' . '<option value="regex" ' . ($this->method == 'regex' ? 'selected' : '') . '>' . I18N::translate('Regular expression') . '</option>' . '</select>' . '<p class="small text-muted">' . $descriptions[$this->method] . '</p>' . $this->error . '</div></div>' . '<div class="form-group">' . '<label class="control-label col-sm-3">' . I18N::translate('Case insensitive') . '</label>' . '<div class="col-sm-9">' . FunctionsEdit::radioButtons('case', array('I' => I18N::translate('no'), 'i' => I18N::translate('yes')), $this->case ? 'i' : 'I', 'class="radio-inline" onchange="this.form.submit();"') . '<p class="small text-muted">' . I18N::translate('Tick this box to match both upper and lower case letters.') . '</p>' . '</div></div>' . parent::getOptionsForm();
 }
开发者ID:tunandras,项目名称:webtrees,代码行数:10,代码来源:BatchUpdateSearchReplacePlugin.php

示例4: getOptionsForm

 /**
  * Default option is just the "don't update CHAN record"
  *
  * @return string
  */
 public function getOptionsForm()
 {
     return '<div class="form-group">' . '<label class="control-label col-sm-3">' . I18N::translate('Keep the existing “last change” information') . '</label>' . '<div class="col-sm-9">' . FunctionsEdit::radioButtons('chan', array(0 => I18N::translate('no'), 1 => I18N::translate('yes')), $this->chan ? 1 : 0, 'class="radio-inline" onchange="this.form.submit();"') . '</div></div>';
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:9,代码来源:BatchUpdateBasePlugin.php

示例5: config


//.........这里部分代码省略.........
        }
        ?>
><?php 
        echo I18N::translate('Satellite');
        ?>
</option>
									<option value="HYBRID" <?php 
        if ($this->getSetting('GM_MAP_TYPE') === 'HYBRID') {
            echo "selected";
        }
        ?>
><?php 
        echo I18N::translate('Hybrid');
        ?>
</option>
									<option value="TERRAIN" <?php 
        if ($this->getSetting('GM_MAP_TYPE') === 'TERRAIN') {
            echo "selected";
        }
        ?>
><?php 
        echo I18N::translate('Terrain');
        ?>
</option>
								</select>
							</td>
						</tr>
						<tr>
							<th><?php 
        echo I18N::translate('Google Street View™');
        ?>
</th>
							<td><?php 
        echo FunctionsEdit::radioButtons('GM_USE_STREETVIEW', array(false => I18N::translate('hide'), true => I18N::translate('show')), $this->getSetting('GM_USE_STREETVIEW'), 'class="radio-inline"');
        ?>
</td>
						</tr>
						<tr>
							<th><?php 
        echo I18N::translate('Size of map (in pixels)');
        ?>
</th>
							<td>
								<?php 
        echo I18N::translate('Width');
        ?>
								<input type="text" name="GM_XSIZE" value="<?php 
        echo $this->getSetting('GM_XSIZE');
        ?>
" size="10">
								<?php 
        echo I18N::translate('Height');
        ?>
								<input type="text" name="GM_YSIZE" value="<?php 
        echo $this->getSetting('GM_YSIZE');
        ?>
" size="10">
							</td>
						</tr>
						<tr>
							<th><?php 
        echo I18N::translate('Zoom level of map');
        ?>
</th>
							<td>
								<?php 
开发者ID:jflash,项目名称:webtrees,代码行数:67,代码来源:GoogleMapsModule.php

示例6: editConfig

    /**
     * Display a form to edit configuration settings.
     */
    private function editConfig()
    {
        $controller = new PageController();
        $controller->restrictAccess(Auth::isAdmin())->setPageTitle(I18N::translate('Chart preferences') . ' — ' . $this->getTitle())->pageHeader();
        ?>
		<ol class="breadcrumb small">
			<li><a href="admin.php"><?php 
        echo I18N::translate('Control panel');
        ?>
</a></li>
			<li><a href="admin_modules.php"><?php 
        echo I18N::translate('Module administration');
        ?>
</a></li>
			<li class="active"><?php 
        echo $controller->getPageTitle();
        ?>
</li>
		</ol>
		<h1><?php 
        echo $controller->getPageTitle();
        ?>
</h1>

		<p>
			<?php 
        echo I18N::translate('Searching for all possible relationships can take a lot of time in complex trees.');
        ?>
		</p>

		<form method="post">
			<?php 
        foreach (Tree::getAll() as $tree) {
            ?>
				<h2><?php 
            echo $tree->getTitleHtml();
            ?>
</h2>
				<div class="form-group">
					<label class="control-label col-sm-3" for="relationship-ancestors-<?php 
            echo $tree->getTreeId();
            ?>
">
						<?php 
            echo I18N::translate('Relationships');
            ?>
					</label>
					<div class="col-sm-9">
						<?php 
            echo FunctionsEdit::selectEditControl('relationship-ancestors-' . $tree->getTreeId(), $this->ancestorsOptions(), null, $tree->getPreference('RELATIONSHIP_ANCESTORS', self::DEFAULT_ANCESTORS), 'class="form-control"');
            ?>
					</div>
				</div>

				<fieldset class="form-group">
					<legend class="control-label col-sm-3">
						<?php 
            echo I18N::translate('How much recursion to use when searching for relationships');
            ?>
					</legend>
					<div class="col-sm-9">
						<?php 
            echo FunctionsEdit::radioButtons('relationship-recursion-' . $tree->getTreeId(), $this->recursionOptions(), $tree->getPreference('RELATIONSHIP_RECURSION', self::DEFAULT_RECURSION), 'class="radio-inline"');
            ?>
					</div>
				</fieldset>
			<?php 
        }
        ?>

			<div class="form-group">
				<div class="col-sm-offset-3 col-sm-9">
					<button type="submit" class="btn btn-primary">
						<i class="fa fa-check"></i>
						<?php 
        echo I18N::translate('save');
        ?>
					</button>
				</div>
			</div>
		</form>
		<?php 
    }
开发者ID:tronsmit,项目名称:webtrees,代码行数:86,代码来源:RelationshipsChartModule.php


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