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


PHP FORM::checkbox方法代码示例

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


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

示例1: __

                            <button type="button" class="btn btn-primary plan-add" data-toggle="modal" data-target="#modalplan">
                                <?php 
echo __('Add a plan');
?>
                            </button>
                        </div>
                    </div>

                    <div class="form-group">
                        <?php 
echo FORM::label($forms['to_top']['key'], __('Bring to top Ad'), array('class' => 'control-label col-sm-4', 'for' => $forms['to_top']['key']));
?>
                        <div class="col-sm-8">
                            <div class="onoffswitch">
                                <?php 
echo FORM::checkbox($forms['to_top']['key'], 1, (bool) $forms['to_top']['value'], array('placeholder' => __("TRUE or FALSE"), 'class' => 'onoffswitch-checkbox', 'id' => $forms['to_top']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => ''));
?>
                                <?php 
echo FORM::label($forms['to_top']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['to_top']['key']));
?>
                            </div>
                        </div>
                    </div>
                
                    <div class="form-group">
                        <?php 
echo FORM::label($forms['pay_to_go_on_top']['key'], __('To top price'), array('class' => 'control-label col-sm-4', 'for' => $forms['pay_to_go_on_top']['key']));
?>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <?php 
开发者ID:EmmanuelSimond,项目名称:openclassifieds2,代码行数:31,代码来源:payment.php

示例2: foreach

?>
>
    <div class="title">Сортировка по маркам авто</div>
    <div class="list">
        <ul>
            <?php 
foreach ($cars as $id => $value) {
    ?>
                <?php 
    $checked = (isset($car_id) and $car_id == $id) ? TRUE : FALSE;
    ?>
                <?php 
    if (!trim($value['name'])) {
        $value['name'] = $value['name_ru'];
    }
    ?>
                <li><label <?php 
    if ($checked) {
        echo 'class="active"';
    }
    ?>
><?php 
    echo FORM::checkbox('car[]', $id, $checked) . $value['name'];
    ?>
</label></li>
            <?php 
}
?>
        </ul>
    </div>
</div>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:cars_list.php

示例3: __

?>
 
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <?php 
echo FORM::label($forms['forums']['key'], __("Activates Forums"), array('class' => 'col-md-4 control-label', 'for' => $forms['forums']['key']));
?>
                            <div class="col-md-8">
                                <div class="onoffswitch">
                                    <?php 
echo FORM::hidden($forms['forums']['key'], 0);
?>
                                    <?php 
echo FORM::checkbox($forms['forums']['key'], 1, (bool) $forms['forums']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'onoffswitch-checkbox', 'id' => $forms['forums']['key'], 'data-content' => __("Once set to TRUE, enables forums posts"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Activates Forums")));
?>
                                    <?php 
echo FORM::label($forms['forums']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['forums']['key']));
?>
                                </div>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <?php 
echo FORM::label($forms['sort_by']['key'], __('Sort by in listing'), array('class' => 'control-label col-sm-4', 'for' => $forms['sort_by']['key']));
?>
                            <div class="col-sm-8">
                                <?php 
echo FORM::select($forms['sort_by']['key'], array('title-asc' => __("Name (A-Z)"), 'title-desc' => __("Name (Z-A)"), 'price-asc' => __("Price (Low)"), 'price-desc' => __("Price (High)"), 'featured' => __("Featured"), 'published-asc' => __("Newest"), 'published-desc' => __("Oldest")), $forms['sort_by']['value'], array('placeholder' => $forms['sort_by']['value'], 'class' => 'tips form-control input-sm ', 'id' => $forms['sort_by']['key'], 'data-content' => __("Sort by in listing"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Sort by in listing")));
开发者ID:Ryanker,项目名称:open-eshop,代码行数:31,代码来源:general.php

示例4: __

                <div class="form-group">
                    <?php 
echo FORM::label($form['description']['id'], __('Description'), array('class' => 'control-label col-md-2', 'for' => $form['description']['id']));
?>
                    <div class="col-sm-9">
                        <?php 
echo FORM::textarea($form['description']['name'], $form['description']['value'], array('class' => 'form-control', 'id' => $form['description']['id'], 'data-editor' => 'html'));
?>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <div class="checkbox">
                            <label class="status">
                                <?php 
echo FORM::checkbox($form['status']['name'], 1, (bool) $form['status']['value']);
?>
 <?php 
echo __('Active');
?>
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <?php 
echo FORM::button('submit', __('Edit'), array('type' => 'submit', 'class' => 'btn btn-success', 'action' => Route::url('oc-panel', array('controller' => 'blog', 'action' => 'update'))));
?>
                    </div>
                </div>
开发者ID:JeffPedro,项目名称:project-garage-sale,代码行数:31,代码来源:update.php

示例5: __

    ?>
                    <?php 
}
?>
                    
                    <div class="form-group">
                        <?php 
echo FORM::label($forms['active']['key'], __('Active'), array('class' => 'col-md-4 control-label', 'for' => $forms['active']['key']));
?>
                        <div class="col-md-8">
                            <div class="onoffswitch">
                                <?php 
echo FORM::hidden($forms['active']['key'], 0);
?>
                                <?php 
echo FORM::checkbox($forms['active']['key'], 1, (bool) $forms['active']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'onoffswitch-checkbox', 'id' => $forms['active']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __('Activates affiliate system')));
?>
                                <?php 
echo FORM::label($forms['active']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['active']['key']));
?>
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <?php 
echo FORM::label($forms['cookie']['key'], __('Cookie Days'), array('class' => 'col-md-4 control-label', 'for' => $forms['cookie']['key']));
?>
                        <div class="col-md-8">
                            <?php 
echo FORM::input($forms['cookie']['key'], $forms['cookie']['value'], array('placeholder' => "90", 'class' => 'tips form-control', 'id' => $forms['cookie']['key'], 'data-content' => __("How many days lasts the tracking cookie"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("How many days lasts the tracking cookie"), 'data-rule-required' => 'true', 'data-rule-digits' => 'true'));
开发者ID:Ryanker,项目名称:open-eshop,代码行数:31,代码来源:affiliates.php

示例6: foreach

                        </div>
                            
                        <?php 
foreach ($config['providers'] as $api => $options) {
    ?>
                            <div class="form-group">
                            <?php 
    echo FORM::label($api, $api, array('class' => 'control-label col-sm-4', 'for' => $api));
    ?>
                                <div class="col-sm-8">
                                    <div class="onoffswitch">
                                        <?php 
    echo FORM::hidden($api, 0);
    ?>
                                        <?php 
    echo FORM::checkbox($api, 1, (bool) $options['enabled'], array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => $api));
    ?>
                                        <?php 
    echo FORM::label($api, "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $api));
    ?>
                                    </div>
                                </div>
                            </div>
                            <?php 
    if (isset($options['keys']['id'])) {
        ?>
                                <div class="form-group">
                                <?php 
        echo FORM::label($api . '_id_label', __('Id'), array('class' => 'control-label col-sm-4', 'for' => $api));
        ?>
                                    <div class="col-sm-8">
开发者ID:JeffPedro,项目名称:project-garage-sale,代码行数:31,代码来源:index.php

示例7: strip_tags

                <div class="form_error"><?php 
echo Message::show_once_error($errors, 'email');
?>
</div>
            </li>
            <li>
                <label class="lab">&nbsp;</label>
                <textarea rows="7" cols="75" readonly="readonly">
                    <?php 
echo strip_tags(DB::select('text')->from('content_site')->where('url', '=', 'ustav')->execute()->get('text'));
?>
                </textarea>
                <br />
                <div style="margin-left: 170px">
                    <?php 
echo FORM::checkbox('accept_rule', 1, FALSE) . __('f_accept_rule');
?>
                </div>
                <div class="form_error"><?php 
echo Message::show_once_error(Arr::get($errors, '_external', array()), 'accept_rule');
?>
</div>
            </li>
            <li>
                <label class="lab">&nbsp;</label>
                <?php 
echo FORM::submit('submit', __('f_continue'), array('class' => 's_button'));
?>
            </li>
        </ul>
    </div>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:first.php

示例8: array

            </ul>
        </div>
    </div>
    <div class="work_filter">
    <div class="title">Сортировка по авто</div>
    <?php 
echo FORM::open('#') . FORM::hidden('city_id', $city_id, array('class' => 'city_id_search_by_work')) . FORM::hidden('work_id', $work_id, array('class' => 'work_id_search_by_work')) . FORM::hidden('district_id', $district_id, array('class' => 'district_id_search_by_work')) . FORM::hidden('metro_id', $metro_id, array('class' => 'metro_id_search_by_work')) . FORM::hidden('discount_id', $discount_id, array('class' => 'discount_id_search_by_work')) . FORM::close();
?>

    <div class="cars_list">
         <ul>
        <?php 
foreach ($cars as $id => $name) {
    ?>
        <li><?php 
    echo FORM::checkbox('car[]', $id, FALSE, array('class' => 'search_cars', 'id' => 'car_' . $id, 'autocomplete' => 'off'));
    ?>
 <label for="car_<?php 
    echo $id;
    ?>
"><?php 
    echo $name;
    ?>
</label></li>
        <?php 
}
?>
         </ul>
    </div>

    </div>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:search_by_work.php

示例9: array

echo FORM::label('captcha', "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => 'captcha'));
?>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <?php 
echo FORM::label('address', __('Address'), array('class' => 'control-label col-sm-4', 'for' => 'address'));
?>
                            <div class="col-sm-8">
                                <div class="onoffswitch">
                                    <?php 
echo FORM::hidden('address', 0);
?>
                                    <?php 
echo FORM::checkbox('address', 1, (bool) core::config('advertisement.address'), array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => 'address', 'data-content' => __("Address field"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Displays the field Address in the Ad form.")));
?>
                                    <?php 
echo FORM::label('address', "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => 'address'));
?>
                                </div>
                            </div>
                        </div>
                        <hr>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-4">
                                <?php 
echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'form')) . '?define=cf'));
?>
                            </div>
                        </div>
开发者ID:nick-catanchin-ie,项目名称:openclassifieds2,代码行数:31,代码来源:index.php

示例10: cf_form_tag

 /**
  * get the html tag code for a field for a custom field
  * @param  string $name input name
  * @param  array  $options as defined
  * @param  mixed $value value of the field, optional.
  * @param  boolean  $old =TRUE renders bs2 styles
  * @param  boolean  $inline renders inline form
  * @return string        HTML
  */
 public static function cf_form_tag($name, $options, $value = NULL, $old = FALSE, $inline = FALSE)
 {
     if ($options['display'] != 'hidden') {
         $label = FORM::label($name, isset($options['label']) ? $options['label'] : $name, array('class' => !$old ? 'control-label' : '', 'for' => $name));
     } else {
         $label = '';
     }
     if ($value === NULL) {
         $value = isset($options['default']) ? $options['default'] : NULL;
     }
     // dependent classes on type
     $class = 'form-control ' . 'cf_' . $options['display'] . '_fields data-custom ';
     switch ($options['display']) {
         case 'textarea':
             $class .= 'span6';
             break;
         case 'checkbox':
             $class = 'cf_' . $options['display'] . '_fields data-custom';
             break;
         case 'radio':
             $class = 'cf_' . $options['display'] . 'fields data-custom';
             $required = (isset($options['required']) and $options['required'] == TRUE) ? 'required' : NULL;
             $data_categories = isset($options['categories']) ? json_encode($options['categories']) : NULL;
             $title = isset($options['tooltip']) ? $options['tooltip'] : NULL;
             break;
         default:
             $class .= " ";
             break;
     }
     $attributes = array('placeholder' => isset($options['label']) ? $options['label'] : $name, 'data-placeholder' => isset($options['label']) ? $options['label'] : $name, 'title' => isset($options['tooltip']) ? $options['tooltip'] : NULL, 'data-categories' => isset($options['categories']) ? json_encode($options['categories']) : NULL, 'class' => $class, 'id' => $name, (isset($options['required']) and $options['required'] == TRUE) ? 'required' : NULL);
     switch ($options['display']) {
         case 'select':
             $input = FORM::select($name, $options['options'], !is_array($value) ? $value : NULL, $attributes);
             break;
         case 'text':
             $input = FORM::input($name, $value, $attributes);
             break;
         case 'textarea':
             $input = FORM::textarea($name, $value, $attributes);
             break;
         case 'hidden':
             $input = FORM::hidden($name, $value, $attributes);
             break;
         case 'datetime':
             $attributes['data-datetime'] = "data-datetime";
             $attributes['data-format'] = "yyyy-MM-dd hh:mm";
             $input = FORM::input($name, $value, $attributes);
             break;
         case 'date':
             $attributes['data-date'] = "data-date";
             $attributes['data-date-format'] = "yyyy-mm-dd";
             $input = FORM::input($name, $value, $attributes);
             break;
         case 'checkbox':
             $checked = $value == 1 ? TRUE : FALSE;
             $input = '';
             $label = '<b>' . $options['label'] . '</b>';
             $input .= '<div class="checkbox"><label>' . $value . FORM::hidden($name, 0) . FORM::checkbox($name, NULL, $checked, $attributes) . '</label></div>';
             break;
         case 'radio':
             $input = '';
             $label = '<b>' . $options['label'] . '</b>';
             $index = 0;
             foreach ($options['options'] as $id => $radio_name) {
                 $checked = $value == $index ? TRUE : FALSE;
                 if ($id !== "") {
                     $input .= '<div class="radio"><label>' . $radio_name . Form::radio($name, $index, $checked, $attributes) . '</label></div>';
                 }
                 $index++;
             }
             break;
         case 'string':
         default:
             $input = FORM::input($name, $value, $attributes);
             break;
     }
     if (!$old) {
         !$inline ? $is_inline = "class='col-md-5 col-sm-8 col-xs-11'" : ($is_inline = "");
         $out = '<div ' . $is_inline . '>' . $label . $input . '</div>';
     } else {
         $out = $label . '<div>' . $input . '</div>';
     }
     return $out;
 }
开发者ID:Wildboard,项目名称:WbWebApp,代码行数:93,代码来源:form.php

示例11: array

echo FORM::label($forms['number_of_orders']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['number_of_orders']['key']));
?>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <?php 
echo FORM::label($forms['qr_code']['key'], __("Show QR code"), array('class' => 'col-md-4 control-label', 'for' => $forms['qr_code']['key']));
?>
                            <div class="col-md-8">
                                <div class="onoffswitch">
                                    <?php 
echo FORM::hidden($forms['qr_code']['key'], 0);
?>
                                    <?php 
echo FORM::checkbox($forms['qr_code']['key'], 1, (bool) $forms['qr_code']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'onoffswitch-checkbox', 'id' => $forms['qr_code']['key'], 'data-content' => __("Show QR code in Product"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Show QR code")));
?>
                                    <?php 
echo FORM::label($forms['qr_code']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['qr_code']['key']));
?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="col-sm-8 col-sm-offset-4">
                        <?php 
echo FORM::button('submit', 'Update', array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'product'))));
开发者ID:johnulist,项目名称:open-eshop,代码行数:31,代码来源:product.php

示例12: defined

<?php

defined('SYSPATH') or die('No direct script access.');
$company_name = Arr::get($values, 'company_name');
echo Message::show_errors($errors);
echo FORM::open($url);
?>
<fieldset style="width: 450px">
    <legend>Параметры страницы</legend>
    <p>Заголовок</p>
    <?php 
echo FORM::input('title', Arr::get($values, 'title'));
?>
    <p>Статус страницы</p>
    <?php 
echo FORM::checkbox('active', 1, (bool) Arr::get($values, 'active', FALSE));
?>
    <?php 
if ($company_name) {
    ?>
        <p>Компания: <?php 
    echo $company_name;
    ?>
</p>
    <?php 
}
?>

</fieldset>

<fieldset>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:form.php

示例13: elseif

?>
				</a>
        <?php 
echo FORM::open(NULL);
if ($city_id) {
    echo FORM::hidden('city_id', $city_id);
}
?>
        <div class="hidden_inputs">
            <?php 
echo FORM::hidden('district_id', $district_id);
echo FORM::hidden('metro_id', $metro_id);
if ($type == 'auto') {
    echo FORM::checkbox('car[]', $car_id, TRUE);
} elseif ($type == 'work') {
    echo FORM::checkbox('work[]', $work_id, TRUE);
}
?>
        </div>
        Географические параметры поиска: <br />
        <div class="search_info">
            <div class="city">город <strong><?php 
echo $city->name;
?>
</strong></div>
            <div class="district"><?php 
if (array_key_exists($district_id, $districts)) {
    echo 'округ <strong>' . $districts[$district_id]->name . '</strong>';
}
?>
</div>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:search.php

示例14: array

<div class="alert alert-block alert-error fade in">
    <?php 
echo HTML::anchor('admin/services', '&times;', array('class' => 'close'));
?>
    <h4 class="alert-heading">Удаление компании <?php 
echo $full_name;
?>
</h4>
    <p>Вы действительно хотите удалить компанию <?php 
echo $full_name;
?>
 со всеми его параметрами (акции, новости, вакансии, отзывы)?</p>
    <p>
        <label>
            <?php 
echo FORM::checkbox('send_notice', 1, FALSE, array('class' => 'send-notice', 'style' => 'display: inline;'));
?>
 Отправить уведомление о удалении
        </label>
    </p>
    <p class="p-cause disabled">
        <strong>Причина удаления:</strong> <br />
        <span style="font-size: 12px;">если не вписать причину, отправится то что указано по умолчанию</span><br />
        <?php 
echo FORM::textarea('delete_cause', NULL, array('class' => 'delete-cause disabled span5', 'placeholder' => $company_deleting_cause, 'disabled' => 'disabled', 'cols' => 60));
?>
    </p>
    <p>
        <?php 
echo FORM::submit('submit', 'Удалить', array('class' => 'btn btn-danger small')) . ' ' . FORM::submit('cancel', 'Отмена', array('class' => 'btn small'));
?>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:delete.php

示例15: __

echo __('General Configuration');
?>
</h3></div>
        <div class="panel-body">
          <div class="form-horizontal" id="default-settings">
            <div class="form-group">
              <?php 
echo FORM::label('map_active', __('Map on homepage'), array('class' => 'control-label col-sm-4', 'for' => 'map_active'));
?>
              <div class="col-sm-8">
                <div class="onoffswitch">
                  <?php 
echo FORM::hidden('map_active', 0);
?>
                  <?php 
echo FORM::checkbox('map_active', 1, (bool) $map_active, array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => 'map_active', 'data-original-title' => __("Map on homepage"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-content' => __("Disables generated map on homepage")));
?>
                  <?php 
echo FORM::label('map_active', "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => 'map_active'));
?>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-4" for="bg_color">
                <?php 
echo __('Background Color');
?>
              </label>
              <div class="col-sm-8">
                <input type="text" name="bg_color" class="form-control color {hash:true, adjust:false}" value="#FFFFFF" onchange="drawVisualization();">
开发者ID:nick-catanchin-ie,项目名称:openclassifieds2,代码行数:31,代码来源:map.php


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