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


PHP BsHtml::dropDownList方法代码示例

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


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

示例1: array

}
?>

    <?php 
if (Yii::app()->user->id != $model->id && (Yii::app()->user->checkAccess('user.edit') || Yii::app()->user->checkAccess('user.create'))) {
    ?>
        <div class="form-group">
            <label class="control-label" for="<?php 
    echo CHtml::activeId($model, 'roles');
    ?>
">
                Роли
            </label>
            <div>
                <?php 
    echo BsHtml::dropDownList(CHtml::activeName($model, 'roles[]'), $assignments, $roles, array("multiple" => "multiple", 'class' => 'bs'));
    ?>
            </div>
        </div>
    <?php 
}
?>
    <?php 
if ($model->isNewRecord) {
    echo BsHtml::submitButton('Создать', array('color' => BsHtml::BUTTON_COLOR_PRIMARY));
} else {
    echo BsHtml::submitButton('Сохранить изменения', array('color' => BsHtml::BUTTON_COLOR_PRIMARY));
}
?>

<?php 
开发者ID:shnellpavel,项目名称:bcgroup_lk,代码行数:31,代码来源:_form.php

示例2: adminSearchRoles

 public function adminSearchRoles($userRole = '')
 {
     $roles = BsHtml::listData(Yii::app()->authManager->getRoles(), 'name', 'description');
     if (Yii::app()->user->role != 'developer') {
         unset($roles['developer']);
     }
     if ($userRole != '') {
         return BsHtml::dropDownList("user_role", $userRole, $roles, array("class" => "j-user_role"));
     } else {
         return $roles;
     }
 }
开发者ID:blrtromax,项目名称:seobility,代码行数:12,代码来源:User.php

示例3: foreach

            <?php 
foreach ($model->Products as $SPP) {
    ?>
                <?php 
    echo $this->renderPartial('_spp_form', array('SPP' => $SPP, 'supplier_id' => $model->supplier_id));
    ?>
            <?php 
}
?>
        </div>
        
        <div id="add-product-form">
            <div class="form-group">
                <div class="col-md-2">
                    <?php 
echo BsHtml::dropDownList('supplier_product_id', null, SupplierProduct::getDropdownListItems($model->supplier_id), array('class' => 'chosen', 'prompt' => '- Select -'));
?>
                </div>
                <div class="col-md-6">
                    <?php 
echo BsHtml::submitButton('Add Product', array('class' => 'add-product', 'name' => 'add_product'));
?>
                    <!-- Button trigger modal -->
                    <button class="btn btn-default" data-toggle="modal" data-target="#sp-form">
                        Create New Product
                    </button>
                </div>
            </div>
        </div>

        <hr />
开发者ID:snapfrozen,项目名称:boxomatic,代码行数:31,代码来源:_form.php

示例4: array

<h1 class="sr-only">Shop</h1>

<?php 
if (!$BoxoCart->location_id) {
    $form = $this->beginWidget('bootstrap.widgets.BsActiveForm', array('id' => 'location-form', 'enableAjaxValidation' => false));
    ?>
<div class="alert alert-warning form-inline">
    <div class="row">
        <div class="col-md-5">
            <div class="form-group">
                <h3>Set Location</h3>
                <?php 
    echo BsHtml::label('Set Location', 'BoxoCart_location_id', array('class' => 'sr-only'));
    ?>
                <?php 
    echo BsHtml::dropDownList('BoxoCart[location_id]', $BoxoCart->location_id, Location::getDeliveryAndPickupList(), array('name' => 'BoxoCart[location_id]', 'prompt' => '- Select -'));
    ?>
                <?php 
    echo BsHtml::submitButton('Set Location');
    ?>
                <p class="hint">
                    <small>This is required to determine which products are available.</small>
                </p>
            </div>
        </div>
        <div class="col-md-1 text-center">
            <p>&nbsp;</p>
            <h3> - Or - </h3>
        </div>
        <div class="col-md-4 col-md-offset-1">
            <h3>Login</h3>
开发者ID:snapfrozen,项目名称:boxomatic,代码行数:31,代码来源:index.php

示例5: array

    </div>
    <div class="col-xs-3">
        <div class="sf_el">
            <div class="myLabel">Общая площадь, кв. м.</div>
            <?php 
echo BsHtml::textField('space_total_from', '', array('class' => 'w40p inline'));
?>
            <div class="text-center inline w16p">&#8211;</div>
            <?php 
echo BsHtml::textField('space_total_to', '', array('class' => 'w40p inline'));
?>
        </div>
        <div class="sf_el">
            <div class="myLabel">Планировка</div>
            <?php 
echo BsHtml::dropDownList('layout_id', '', array('1' => 'Планировка 1', '2' => 'Планировка 2', '3' => 'Планировка 3', '4' => 'Планировка 4', '5' => 'Планировка 5', '6' => 'Планировка 6'), array('multiple' => 'multiple', 'class' => 'multiselect'));
?>
        </div>
        <div class="sf_el">
            <div class="myLabel">Цена, руб</div>
            <?php 
echo BsHtml::textField('price_from', '', array('class' => 'w40p inline'));
?>
            <div class="text-center inline w16p">&#8211;</div>
            <?php 
echo BsHtml::textField('price_to', '', array('class' => 'w40p inline'));
?>
        </div>
    </div>
    <div class="col-xs-3">
        <div class="sf_el">
开发者ID:postfx,项目名称:fermion,代码行数:31,代码来源:_search_area.php


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