本文整理汇总了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
示例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">
示例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();
}
示例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>';
}
示例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
示例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
}