本文整理汇总了PHP中theme::checkbox方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::checkbox方法的具体用法?PHP theme::checkbox怎么用?PHP theme::checkbox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类theme
的用法示例。
在下文中一共展示了theme::checkbox方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
theme::start_form_section('Display', 3);
theme::text('display', $options->display);
theme::end_form_section();
theme::start_form_section('Help');
theme::text('help', $options->help);
theme::end_form_section();
theme::start_form_section('Required', 1);
theme::checkbox('required', 1, $options->required);
theme::end_form_section();
theme::start_form_section('Index', 1);
theme::checkbox('index', 1, $options->index);
theme::end_form_section();
theme::start_form_section('Columns', 1);
theme::text('columns', $options->columns);
theme::end_form_section();
theme::start_form_section('Filter');
$list = ['int', 'float', 'money', 'num', 'hex', 'email', 'alpha', 'alphanum', 'alphanumlower', 'alphaspace', 'alphanumspace', 'alphanumspacelower', 'url', 'phone'];
echo '<select class="select3" name="filter">';
foreach ($list as $v) {
$select = $v == $options->filter ? 'selected' : '';
echo '<option ' . $select . ' value="' . $v . '">' . $v . '</option>';
}
echo '</select>';
theme::end_form_section();
示例2:
theme::start_form_section('Hour', 2);
theme::text('hour', $record->hour);
theme::end_form_section();
theme::start_form_section('Day Of Month', 2);
theme::text('day_of_month', $record->day_of_month);
theme::end_form_section();
theme::start_form_section('Month', 2);
theme::text('month', $record->month);
theme::end_form_section();
theme::start_form_section('Day Of Week', 2);
theme::text('day_of_week', $record->day_of_week);
theme::end_form_section();
theme::start_form_section('URL', true);
theme::text('url', $record->url);
theme::end_form_section('This is the equilate of calling a CodeIgniter controller from the command line. php index.php <b>controller/method/arg1/arg2</b>');
theme::start_form_section('Log');
theme::checkbox('add_log', 1, $record->add_log);
theme::end_form_section();
theme::start_form_section('Keep', 1);
theme::text('keep', $record->keep);
theme::end_form_section('How many previous log files to keep');
theme::start_form_section('Note');
theme::textarea('note', $record->note);
theme::end_form_section();
theme::view_event($controller_path, 'form.footer');
theme::hr(0, 12);
theme::footer_start();
theme::footer_required();
theme::footer_button('submit');
theme::footer_end();
theme::form_end();
示例3: strtotime
theme::end_form_section();
theme::start_form_section('Email', true, 3);
o::text('email', $record->email);
theme::end_form_section();
theme::start_form_section('Password', $record->id == -1, 3);
o::password('password', ['value' => $record->password]);
theme::end_form_section($password_format_copy);
theme::start_form_section('Confirm Password', $record->id == -1, 3);
o::password('confirm_password', ['value' => $record->confirm_password]);
theme::end_form_section();
if ($record->id != 1) {
theme::start_form_section('Role', 4);
theme::dropdown3('role_id', $record->role_id, o::smart_model_list('o_role_model', 'id', 'name'));
theme::end_form_section();
theme::start_form_section('Active');
theme::checkbox('is_active', 1, $record->is_active);
theme::end_form_section();
} else {
o::hidden('role_id', $record->role_id);
o::hidden('is_active', $record->is_active);
}
if (strtotime($record->last_login) > 1) {
theme::start_form_section('Last login');
theme::static_text(date('F j, Y, g:i a', strtotime($record->last_login)));
o::hidden('last_login', $record->last_login);
theme::end_form_section();
}
o::view_event($controller_path, 'form.footer');
o::hr(0, 12);
theme::footer_start();
theme::footer_cancel_button($controller_path);
示例4:
o::hr(0, 12);
/* 4px padding top and bottom */
theme::start_form_section('Name', true, 5);
o::text('curr_name', $record->curr_name);
theme::end_form_section();
theme::start_form_section('Exchange Rate', true, 2);
o::text('curr_exchange_rate', $record->curr_exchange_rate);
theme::end_form_section();
theme::start_form_section('Symbol HTML', true, 2);
o::text('curr_symbol', $record->curr_symbol);
theme::end_form_section();
theme::start_form_section('Suffix', 2);
theme::checkbox('curr_symbol_suffix', 1, $record->curr_symbol_suffix);
theme::end_form_section();
theme::start_form_section('Thousand', true, 2);
o::text('curr_thousand_separator', $record->curr_thousand_separator);
theme::end_form_section();
theme::start_form_section('Decimal', true, 2);
o::text('curr_decimal_separator', $record->curr_decimal_separator);
theme::end_form_section();
theme::start_form_section('Enabled');
theme::checkbox('curr_status', 1, $record->curr_status);
theme::end_form_section();
o::hr(0, 12);
/* 4px padding top and bottom */
theme::footer_start();
theme::footer_cancel_button($controller_path);
theme::footer_submit_button();
theme::footer_required();
theme::footer_end();
theme::form_end();
示例5:
<?php
theme::form_start($controller_path . '/' . $controller_action, $record->id);
theme::header_start(ucfirst($controller_action) . ' Trackback');
theme::header_button('cancel');
theme::header_end();
theme::hr(0, 12);
theme::start_form_section('Match', true, 5);
echo '<div class="input-group">';
echo '<div class="input-group-addon">/trackback/</div>';
theme::text('match', $record->match);
echo '</div>';
theme::end_form_section();
theme::start_form_section('Trackback to URL', true, 5);
theme::text('url', $record->url);
theme::end_form_section();
theme::start_form_section('Active');
theme::checkbox('active', 1, $record->active);
theme::end_form_section();
theme::hr(0, 12);
theme::footer_start();
theme::footer_required();
theme::footer_button('submit');
theme::footer_end();
theme::form_end();
示例6: foreach
}
echo '</ul>';
echo '<div class="well" style="overflow: hidden">';
echo '<div id="my-tab-content" class="tab-content">';
foreach ($access_tabs as $idx => $tab) {
echo '<div class="tab-pane" id="tab-' . md5($tab) . '" style="margin-top: -14px">';
foreach ($all_access as $access_record) {
if ($access_record->group == $tab) {
echo '<div style="padding: 2px 0">';
theme::checkbox('access[' . $access_record->id . ']', $access_record->id, array_key_exists($access_record->id, $access), ['text' => $access_record->name . ' <small class="text-info">' . $access_record->description . '</small>']);
echo '</div>';
}
}
echo '</div>';
}
echo '</div>';
echo '</div>';
/* close well */
theme::end_form_section(' ');
o::view_event($controller_path, 'form.footer');
o::hr(0, 12);
theme::footer_start();
theme::footer_cancel_button($controller_path);
theme::footer_submit_button();
theme::footer_required();
theme::footer_end();
theme::form_end();
foreach ($access_options as $id => $access) {
theme::checkbox('groups[]', $id, array_key_exists($id, $groups), ['text' => $access->description . ' <small style="opacity: .6">' . $access->key . '</small>']);
echo '<div style="height: 6px;"></div>';
}
示例7:
<?php
theme::form_start($controller_path . '/' . $controller_action, $record->id);
theme::header_start(ucfirst($controller_action) . ' Template');
theme::header_button('cancel');
theme::header_end();
theme::hr(0, 12);
theme::start_form_section('Name', true, 5);
if (has_access('templates::change name') || $this->id < 0) {
theme::text('name', $record->name);
} else {
theme::static_text($record->name);
}
theme::hidden('previous_name', $record->name);
theme::end_form_section();
theme::start_form_section('HTML', true);
codemirror::textarea('content', $record->content);
if ($record->id > 0) {
$save_text = os_save::copy();
}
theme::end_form_section('Pressing Esc will toggle fullscreen ~ ' . $save_text);
theme::hr(0, 12);
theme::footer_start();
theme::checkbox('is_file', 1, $record->is_file);
echo ' Save as file';
theme::footer_required();
theme::footer_button('submit');
theme::footer_end();
theme::form_end();
示例8:
theme::end_form_section();
theme::start_form_section('Categories');
Plugin_chosen::show('categories', $record->categories, $category_options);
theme::end_form_section();
theme::start_form_section('Picture');
plugin_attach_file::image('picture', $record->picture, 150, 1);
theme::end_form_section();
theme::start_form_section('Link');
theme::text('link', $record->link);
theme::end_form_section();
theme::start_form_section('Content');
plugin_bootstrap_wysiwyg::input('content', $record->content, ['toolbar' => $controller_path . '/toolbar.php']);
theme::end_form_section();
theme::start_form_section('Show After', 3);
plugin_datetimepicker::date_time('start_on', $record->start_on);
theme::end_form_section();
theme::start_form_section('Hide After', 3);
plugin_datetimepicker::date_time('end_on', $record->end_on);
theme::end_form_section();
theme::start_form_section('Is Visible');
theme::checkbox('is_visible', 1, $record->is_visible);
theme::end_form_section();
theme::start_form_section('Note');
theme::textarea('note', $record->note);
theme::end_form_section();
theme::hr(0, 12);
theme::footer_start();
theme::footer_required();
theme::footer_button('submit');
theme::footer_end();
theme::form_end();
示例9:
theme::text('title', $record->title, ['class' => 'js-human-input']);
theme::end_form_section();
theme::start_form_section('Segment', true, 5);
Plugin_locked_field::show('segment', $record->segment, ['has_access' => 'page::change internal', 'class' => 'js-computer-input']);
theme::end_form_section();
theme::start_form_section('URL');
theme::static_text($record->url);
theme::end_form_section('The URL is dynamically generated when the record is saved.');
theme::start_form_section('Show in menu');
theme::checkbox('in_menu', 1, $record->in_menu);
theme::end_form_section();
theme::start_form_section('Is Visible');
theme::checkbox('is_visible', 1, $record->is_visible);
theme::end_form_section();
theme::start_form_section('Wildcard');
theme::checkbox('wildcard', 1, $record->wildcard);
theme::end_form_section();
theme::start_form_section('Show After', false, 3);
plugin_datetimepicker::date_time('start_on', $record->start_on);
theme::end_form_section();
theme::start_form_section('Hide After', false, 3);
plugin_datetimepicker::date_time('end_on', $record->end_on);
theme::end_form_section();
theme::start_form_section('Template', true);
theme::dropdown3('template_id', $record->template_id, $templates);
theme::end_form_section($save_text);
theme::start_form_section('Note');
theme::textarea('note', $record->note, ['rows' => 3]);
theme::end_form_section();
theme::view_event($controller_path, 'form.footer');
theme::hr(0, 12);
示例10:
<?php
theme::start_form_section('Required', 1);
theme::checkbox('required', 1, $options->required);
theme::end_form_section();
theme::start_form_section('Minimum Height', true, 3);
theme::text('min_height', $options->min_height, ['data-parsley-required' => 'true', 'data-parsley-type' => 'integer']);
theme::end_form_section();
theme::start_form_section('Minimum Width', true, 3);
theme::text('min_width', $options->min_width, ['data-parsley-required' => 'true', 'data-parsley-type' => 'integer']);
theme::end_form_section();
theme::start_form_section('Zoom', 3);
theme::text('zoom', $options->zoom, ['data-parsley-type' => 'integer']);
theme::end_form_section('The form preview is the maximum width and height divided by this number to keep it to a manageable size on the form');
theme::start_form_section('Image Public Folder', true);
theme::text('image_path', $options->image_path, ['placeholder' => '/images/']);
theme::end_form_section('public path to save images');