} ?> <?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
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; } }
<?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 />
<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>
</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">