本文整理汇总了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
示例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;
}
}
示例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 />
示例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> </p>
<h3> - Or - </h3>
</div>
<div class="col-md-4 col-md-offset-1">
<h3>Login</h3>
示例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">–</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">–</div>
<?php
echo BsHtml::textField('price_to', '', array('class' => 'w40p inline'));
?>
</div>
</div>
<div class="col-xs-3">
<div class="sf_el">