本文整理匯總了PHP中Fisharebest\Webtrees\Functions\FunctionsEdit::checkbox方法的典型用法代碼示例。如果您正苦於以下問題:PHP FunctionsEdit::checkbox方法的具體用法?PHP FunctionsEdit::checkbox怎麽用?PHP FunctionsEdit::checkbox使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Fisharebest\Webtrees\Functions\FunctionsEdit
的用法示例。
在下文中一共展示了FunctionsEdit::checkbox方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
echo I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.');
?>
</p>
</div>
<div class="label">
<label for="form_visible_online">
<?php
echo I18N::translate('Visible to other users when online');
?>
</label>
</div>
<div class="value">
<?php
echo FunctionsEdit::checkbox('form_visible_online', Auth::user()->getPreference('visibleonline'));
?>
<p class="small text-muted">
<?php
echo I18N::translate('This checkbox controls your visibility to other users while you’re online. It also controls your ability to see other online users who are configured to be visible.<br><br>When this box is unchecked, you will be completely invisible to others, and you will also not be able to see other online users. When this box is checked, exactly the opposite is true. You will be visible to others, and you will also be able to see others who are configured to be visible.');
?>
</p>
</div>
</div>
<div id="edituser_submit">
<input type="submit" value="<?php
echo I18N::translate('save');
?>
">
</div>
<?php
示例2: pageBody
//.........這裏部分代碼省略.........
<button type="button" class="close" data-dismiss="alert" aria-label="' . I18N::translate('close') . '">
<span aria-hidden="true">×</span>
</button>
<p class="small text-muted">
<?php
echo I18N::translate('Use the search form below to search for a root person. After a successful search the Fancy Treeview page will be automatically created. You can add as many root persons as you want.');
?>
</p>
</div>
<?php
}
?>
<!-- *** FORM 2 *** -->
<div id="ftv-search-form" class="form-group alert alert-info">
<form class="form-inline" method="post" name="form2">
<!-- SURNAME SEARCH FIELD -->
<div class="form-group">
<label class="control-label">
<?php
echo I18N::translate('Search root person');
?>
</label>
<input
class="form-control"
data-autocomplete-type="SURN"
id="surname-search"
name="SURNAME"
placeholder="<?php
echo I18N::translate('Surname');
?>
"
type="text"
>
<label class="checkbox-inline">
<?php
echo FunctionsEdit::checkbox('soundex_std') . I18N::translate('Russell');
?>
</label>
<label class="checkbox-inline">
<?php
echo FunctionsEdit::checkbox('soudex_dm') . I18N::translate('Daitch-Mokotoff');
?>
</label>
<button name="search" class="btn btn-primary" type="submit">
<i class="fa fa-search"></i>
<?php
echo I18N::translate('search');
?>
</button>
</div>
<!-- PID SEARCH FIELD -->
<?php
$class = I18N::direction() === 'rtl' ? 'pull-left' : 'pull-right';
?>
<div class="form-group <?php
echo $class;
?>
">
<label class="control-label" for="pid-search">
<?php
echo I18N::translate('Or enter an ID');
?>
</label>
<input
class="form-control"
data-autocomplete-type="INDI"
示例3: adminPlaces
//.........這裏部分代碼省略.........
?>
&action=DeleteRecord&deleteRecord=' + placeid;
}
}
</script>
<p id="gm_breadcrumb">
<?php
$where_am_i = $this->placeIdToHierarchy($parent);
foreach (array_reverse($where_am_i, true) as $id => $place) {
if ($id == $parent) {
if ($place != 'Unknown') {
echo Filter::escapeHtml($place);
} else {
echo I18N::translate('unknown');
}
} else {
echo '<a href="module.php?mod=googlemap&mod_action=admin_places&parent=', $id, '&inactive=', $inactive, '">';
if ($place != 'Unknown') {
echo Filter::escapeHtml($place), '</a>';
} else {
echo I18N::translate('unknown'), '</a>';
}
}
echo ' - ';
}
?>
<a href="module.php?mod=googlemap&mod_action=admin_places&parent=0&inactive=', $inactive, '"><?php
echo I18N::translate('Top level');
?>
</a>
</p>
<form class="form-inline" name="active" method="post" action="module.php?mod=googlemap&mod_action=admin_places&parent=', $parent, '&inactive=', $inactive, '">
<div class="checkbox">
<label for="inactive">
<?php
echo FunctionsEdit::checkbox('inactive', $inactive, 'onclick="updateList(this.checked)"');
?>
<?php
echo I18N::translate('Show inactive places');
?>
</label>
</div>
<p class="small text-muted">
<?php
echo I18N::translate('By default, the list shows only those places which can be found in your family trees. You may have details for other places, such as those imported in bulk from an external file. Selecting this option will show all places, including ones that are not currently used.');
?>
<?php
echo I18N::translate('If you have a large number of inactive places, it can be slow to generate the list.');
?>
</p>
</form>
<?php
$placelist = $this->getPlaceListLocation($parent, $inactive);
echo '<div class="gm_plac_edit">';
echo '<table class="table table-bordered table-condensed table-hover"><tr>';
echo '<th>', GedcomTag::getLabel('PLAC'), '</th>';
echo '<th>', GedcomTag::getLabel('LATI'), '</th>';
echo '<th>', GedcomTag::getLabel('LONG'), '</th>';
echo '<th>', I18N::translate('Zoom level'), '</th>';
echo '<th>', I18N::translate('Icon'), '</th>';
echo '<th>';
echo I18N::translate('Edit'), '</th><th>', I18N::translate('Delete'), '</th></tr>';
if (count($placelist) == 0) {
echo '<tr><td colspan="7">', I18N::translate('No places found'), '</td></tr>';
示例4: pageBody
private function pageBody(PageController $controller)
{
$FRL_PLUGINS = unserialize($this->getSetting('FRL_PLUGINS'));
?>
<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>
<h2><?php
echo $controller->getPageTitle();
?>
</h2>
<p class="small text-muted"><?php
echo I18N::translate('Check the plugins you want to use in the sidebar.');
?>
</p>
<form class="form-horizontal" method="post" name="configform" action="<?php
echo $this->getConfigLink();
?>
">
<input type="hidden" name="save" value="1">
<!-- SELECT ALL -->
<div class="form-group checkbox col-sm-12">
<label>
<?php
echo FunctionsEdit::checkbox('select-all') . I18N::translate('select all');
?>
</label>
</div>
<!-- RESEARCH LINKS -->
<?php
foreach ($this->getPluginList() as $area => $plugins) {
?>
<div class="form-group col-sm-12">
<h4><?php
echo $area;
?>
</h4>
<?php
foreach ($plugins as $label => $plugin) {
?>
<?php
if (is_array($FRL_PLUGINS) && array_key_exists($label, $FRL_PLUGINS)) {
$enabled = $FRL_PLUGINS[$label];
} else {
$enabled = '1';
}
?>
<div class="checkbox col-sm-4" dir="ltr">
<label class="checkbox-inline">
<?php
echo FunctionsEdit::twoStateCheckbox('NEW_FRL_PLUGINS[' . $label . ']', $enabled) . ' ' . $plugin->getPluginName();
?>
</label>
</div>
<?php
}
?>
</div>
<?php
}
?>
<div class="form-group col-sm-12">
<button type="submit" class="btn btn-primary">
<i class="fa fa-check"></i>
<?php
echo I18N::translate('save');
?>
</button>
<button type="reset" class="btn btn-primary" onclick="if (confirm('<?php
echo I18N::translate('The settings will be reset to default. Are you sure you want to do this?');
?>
'))
window.location.href = 'module.php?mod=<?php
echo $this->getName();
?>
&mod_action=admin_reset';">
<i class="fa fa-recycle"></i>
<?php
echo I18N::translate('reset');
?>
</button>
</div>
</form>
<?php
}