本文整理汇总了PHP中category::form_tree方法的典型用法代码示例。如果您正苦于以下问题:PHP category::form_tree方法的具体用法?PHP category::form_tree怎么用?PHP category::form_tree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类category
的用法示例。
在下文中一共展示了category::form_tree方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_array
<div class="categories report_category">
<h2><?php
echo Kohana::lang('ui_main.categories');
?>
</h2>
<div style="clear: left; width: 100%; float: left;">
<input type="checkbox" id="category_all" name="category_all" onclick="CheckAll(this.id, 'category')"/><strong><?php
echo utf8::strtoupper(Kohana::lang('ui_main.select_all'));
?>
</strong>
</div>
<?php
$selected_categories = (!empty($form['incident_category']) and is_array($form['incident_category'])) ? $selected_categories = $form['incident_category'] : array();
if (method_exists('category', 'form_tree')) {
echo category::form_tree('category', $selected_categories, 2, TRUE);
} elseif (Kohana::config('settings.ushahidi_version') >= 2.4 and Kohana::config('settings.ushahidi_version') <= 2.5) {
echo category::tree(ORM::factory('category')->find_all(), TRUE, $selected_categories, 'category', 2, TRUE);
} elseif (Kohana::config('settings.ushahidi_version') < 2.4) {
echo category::tree(ORM::factory('category')->find_all(), $selected_categories, 'category', 2, TRUE);
}
?>
</div>
<div>
<!-- JP: Reformated the layout. -->
<table style="width: 100%; clear: both;">
<tr>
<td style="width: 50%">
<h2><?php
echo Kohana::lang('ui_main.verification');
?>
示例2: is_array
?>
</span>
</div>
</div>
</div>
<div class="step-3">
<h2><?php
echo Kohana::lang('ui_main.alerts_step3_select_catgories');
?>
</h2>
<div class="holder">
<div class="box">
<div class="report_category" id="categories">
<?php
$selected_categories = (!empty($form['alert_category']) and is_array($form['alert_category'])) ? $selected_categories = $form['alert_category'] : array();
echo category::form_tree('alert_category', $selected_categories, 2, TRUE, FALSE);
?>
</div>
</div>
</div>
</div>
<input id="btn-send-alerts" class="btn_submit" type="submit" value="<?php
echo Kohana::lang('ui_main.alerts_btn_send');
?>
" />
<BR /><BR />
<a href="<?php
echo url::site() . "alerts/confirm";
?>
"><?php
echo Kohana::lang('ui_main.alert_confirm_previous');
示例3: is_array
<div class="report_row">
<!-- Adding event for endtime plugin to hook into -->
<?php
Event::run('ushahidi_action.report_form_frontend_after_time');
?>
</div>
<div class="report_row">
<label><?php
echo Kohana::lang('ui_main.reports_categories');
?>
<span class="required">*</span></label>
<div class="report_category" id="categories">
<?php
$selected_categories = (!empty($form['incident_category']) and is_array($form['incident_category'])) ? $selected_categories = $form['incident_category'] : array();
echo category::form_tree('incident_category', $selected_categories, 2);
?>
</div>
</div>
<?php
// Action::report_form - Runs right after the report categories
Event::run('ushahidi_action.report_form');
?>
<?php
echo $custom_forms;
?>
<div id="report_optional" class="well">
<h3><?php
示例4: array
<?php
echo form::textarea('action_email_body', '');
?>
</div>
<div class="tab_form_item" id="action_form_add_category" style="margin-right:75px;">
<h4><a href="#" class="tooltip" title="<?php
echo html::escape(Kohana::lang("tooltips.actions.add_to_category"));
?>
"><?php
echo Kohana::lang('ui_admin.add_to_category');
?>
:</a></h4>
<?php
// categories, selected_categories, form field name, number of columns
echo category::form_tree('action_add_category', array(), 1, FALSE, TRUE);
?>
</div>
<div class="tab_form_item" id="action_form_report_title" style="margin-right:75px;">
<h4><a href="#" class="tooltip" title="<?php
echo html::escape(Kohana::lang("tooltips.actions.report_title"));
?>
"><?php
echo Kohana::lang('ui_admin.report_title');
?>
:</a></h4>
<?php
echo form::input('action_report_title', '');
?>
</div>
示例5: array
print '<br/>';
print '<span>';
print '<a href="#" id="add_new_category">' . Kohana::lang('ui_main.add') . '</a>';
print '</span>';
?>
</div>
<div class="report_category">
<?php
$selected_categories = array();
if (!empty($form['incident_category']) && is_array($form['incident_category'])) {
$selected_categories = $form['incident_category'];
}
$columns = 2;
echo category::form_tree('incident_category', $selected_categories, $columns, FALSE, TRUE);
?>
</div>
</div>
<?php
echo $custom_forms;
?>
</div>
<!-- f-col-1 -->
<div class="f-col-1">
<div class="incident-location">
<h4><?php
echo Kohana::lang('ui_main.incident_location');
?>
示例6: array
<h4><?php
echo Kohana::lang('ui_main.categories');
?>
<span><?php
echo Kohana::lang('ui_main.select_multiple');
?>
.</span></h4>
<div class="report_category">
<?php
$selected_categories = array();
if (!empty($form['incident_category']) && is_array($form['incident_category'])) {
$selected_categories = $form['incident_category'];
}
$columns = 2;
echo category::form_tree('incident_category', $selected_categories, $columns);
?>
</div>
</div>
<?php
echo $custom_forms;
?>
</div>
<!-- f-col-1 -->
<div class="f-col-1">
<div class="incident-location">
<h4><?php
echo Kohana::lang('ui_main.incident_location');
?>
示例7: array
<?php
echo form::open(NULL, array('method' => 'get', 'class' => 'report-search-form'));
?>
<h4><?php
echo Kohana::lang('ui_main.filter_reports_by');
?>
</h4>
<?php
$search = array();
?>
<div class="row category-row">
<?php
// Category
echo form::label('c', Kohana::lang('ui_main.category'));
echo category::form_tree('c', $categories, 1, TRUE, TRUE);
?>
</div>
<div class="row location-row">
<?php
// Location
echo form::label('location_filter', Kohana::lang('ui_main.location'));
echo form::checkbox('location_filter', 1, $location_filter);
echo $alert_radius_view;
?>
</div>
<div class="row">
<?php
// date range
echo form::label('from', Kohana::lang('ui_main.from'), ' class="fixw"');
echo form::input('from', date('M d, Y', $date_from));