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


PHP FunctionsEdit::twoStateCheckbox方法代码示例

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


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

示例1:

    }
    echo '>', I18N::number($i), '</option>';
}
?>
						</select>
					</td>
				</tr>
				<tr>
					<td class="descriptionbox">
						<?php 
echo '<label>', I18N::translate('Show details'), '</label>';
?>
					</td>
					<td class="optionbox">
						<?php 
echo FunctionsEdit::twoStateCheckbox('show_full', $controller->showFull());
?>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
<?php 
if ($controller->error_message) {
    echo '<p class="ui-state-error">', $controller->error_message, '</p>';
    return;
}
switch ($controller->chart_style) {
    case 0:
        // List
        echo '<ul id="ancestry_chart" class="chart_common">';
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:ancestry.php

示例2:

echo I18N::translate('Individual 1');
?>
				</td>
				<td class="optionbox">
					<input class="pedigree_form" data-autocomplete-type="INDI" type="text" name="pid1" id="pid1" size="3" value="<?php 
echo $pid1;
?>
">
					<?php 
echo FunctionsPrint::printFindIndividualLink('pid1');
?>
				</td>
				<td class="optionbox">
					<label>
						<?php 
echo FunctionsEdit::twoStateCheckbox('show_full', $show_full);
?>
						<?php 
echo I18N::translate('Show details');
?>
					</label>
				</td>
				<td class="optionbox vmiddle" rowspan="2">
					<input type="submit" value="<?php 
echo I18N::translate('View');
?>
">
				</td>
			</tr>
			<tr>
				<td class="descriptionbox">
开发者ID:josefpavlik,项目名称:webtrees,代码行数:31,代码来源:relationship.php

示例3: 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();
        ?>
&amp;mod_action=admin_reset';">
					<i class="fa fa-recycle"></i>
					<?php 
        echo I18N::translate('reset');
        ?>
				</button>
			</div>
		</form>
		<?php 
    }
开发者ID:bschwede,项目名称:fancy_research_links,代码行数:97,代码来源:AdminTemplate.php

示例4:

?>
</a></th>
			<th class="hidden"><?php 
echo I18N::translate('Themes');
?>
</th>
		</tr>
		</thead>
		<tbody>
			<?php 
foreach ($modules as $module_name => $module) {
    ?>
				<tr>
					<td class="text-center">
						<?php 
    echo FunctionsEdit::twoStateCheckbox('status-' . $module->getName(), $module_status[$module_name] === 'enabled');
    ?>
					</td>
					<td>
						<?php 
    if ($module instanceof ModuleConfigInterface) {
        ?>
							<a href="<?php 
        echo $module->getConfigLink();
        ?>
">
								<?php 
        echo $module->getTitle();
        ?>
 <i class="fa fa-cogs"></i>
							</a>
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:admin_modules.php

示例5:

</th>
			<th class="hidden-xs"><a href="admin_module_reports.php"><?php 
echo I18N::translate('Reports');
?>
</a></th>
			<th class="hidden"><?php 
echo I18N::translate('Themes');
?>
</th>
		</tr>
		</thead>
		<tbody>
		<?php 
foreach ($modules as $module_name => $module) {
    $status = $module_status[$module_name];
    echo '<tr><td class="text-center">', FunctionsEdit::twoStateCheckbox('status-' . $module->getName(), $status === 'enabled'), '</td>', '<td>';
    if ($module instanceof ModuleConfigInterface) {
        echo '<a href="', $module->getConfigLink(), '">';
    }
    echo $module->getTitle();
    if ($module instanceof ModuleConfigInterface) {
        echo ' <i class="fa fa-cogs"></i></a>';
    }
    echo '</td>', '<td>', $module->getDescription(), '</td>', '<td class="text-center text-muted hidden-xs">', $module instanceof ModuleMenuInterface ? '<i class="fa fa-list-ul" title="' . I18N::translate('Menu') . '"></i>' : '-', '</td>', '<td class="text-center text-muted hidden-xs">', $module instanceof ModuleTabInterface ? '<i class="fa fa-folder" title="' . I18N::translate('Tab') . '"></i>' : '-', '</td>', '<td class="text-center text-muted hidden-xs">', $module instanceof ModuleSidebarInterface ? '<i class="fa fa-th-large" title="' . I18N::translate('Sidebar') . '"></i>' : '-', '</td>', '<td class="text-center text-muted hidden-xs">', $module instanceof ModuleBlockInterface ? ($module->isUserBlock() ? '<i class="fa fa-user" title="' . I18N::translate('My page') . '"></i>' : '') . ($module->isGedcomBlock() ? '<i class="fa fa-tree" title="' . I18N::translate('Home page') . '"></i>' : '') : '-', '</td>', '<td class="text-center text-muted hidden">', $module instanceof ModuleChartInterface ? '<i class="fa fa-check" title="' . I18N::translate('Chart') . '"></i>' : '-', '</td>', '<td class="text-center text-muted hidden-xs">', $module instanceof ModuleReportInterface ? '<i class="fa fa-file" title="' . I18N::translate('Report') . '"></i>' : '-', '</td>', '<td class="text-center text-muted hidden">', $module instanceof ModuleThemeInterface ? '<i class="fa fa-check" title="' . I18N::translate('Theme') . '"></i>' : '-', '</td>', '</tr>';
}
?>
		</tbody>
	</table>
	<button class="btn btn-primary" type="submit">
		<i class="fa fa-check"></i>
		<?php 
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:admin_modules.php

示例6: renderContent

    /**
     * {@inhericDoc}
     * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
     */
    protected function renderContent()
    {
        $table_id = $this->data->get('table_id');
        ?>
        
        <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 $this->data->get('title');
        ?>
</li>
		</ol>
		
		<div align="center">
			<div id="tabs">
				<form method="post" action="#">
					<?php 
        echo Filter::getCsrf();
        ?>
					<input type="hidden" name="action" value="update">
					<table id="<?php 
        echo $table_id;
        ?>
" class="table table-bordered table-condensed table-hover table-site-changes" >
						<thead>
							<tr>
								<th><?php 
        echo I18N::translate('Enabled');
        ?>
</th>
								<th>ENABLED_SORT</th>
								<th><?php 
        echo I18N::translate('Hook Function');
        ?>
</th>
								<th><?php 
        echo I18N::translate('Hook Context');
        ?>
</th>
								<th><?php 
        echo I18N::translate('Module Name');
        ?>
</th>
								<th><?php 
        echo I18N::translate('Priority (1 is high)');
        ?>
</th>
								<th>PRIORITY_SORT</th>
							</tr>
						</thead>
						<tbody> 
							<?php 
        $hooks = $this->data->get('hook_list');
        foreach ($hooks as $hook) {
            ?>
							<tr>
								<td>
									<input type="hidden" name="hook-<?php 
            echo $hook->id;
            ?>
" value="yes" >
									<?php 
            echo FunctionsEdit::twoStateCheckbox('status-' . $hook->id, $hook->status == 'enabled');
            ?>
								</td>
								<td><?php 
            echo $hook->status == 'enabled';
            ?>
</td>
								<td><?php 
            echo $hook->hook;
            ?>
</td>
								<td><?php 
            echo $hook->context;
            ?>
</td>
								<td><?php 
            if ($mod = Module::getModuleByName($hook->module)) {
                echo $mod->getTitle();
            }
            ?>
</td>
								<td><input type="text" class="center" size="2" value="<?php 
            echo $hook->priority;
            ?>
" name="moduleorder-<?php 
            echo $hook->id;
            ?>
//.........这里部分代码省略.........
开发者ID:jon48,项目名称:webtrees-lib,代码行数:101,代码来源:AdminConfigView.php


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