Example #1
0
use yii\bootstrap\ActiveForm;
use common\models\ProductCategory;
?>
<div class="row">
    <?php 
$form = ActiveForm::begin(['method' => 'post', 'layout' => 'horizontal']);
?>
            <?php 
echo $form->field($model, 'name')->textInput();
?>
            <?php 
echo $form->field($model, 'icon_class')->textInput();
?>
s
            <?php 
echo $form->field($model, 'parent_id')->dropDownList(ProductCategory::getTreeIdNameList(), ['class' => 'form-control chosen-select']);
?>
            <?php 
echo $form->field($model, 'display_order')->textInput();
?>
        
        <div class="form-group">
            <div class="col-sm-offset-3 col-sm-6">
                <button class="btn btn-primary pull-right btn-block">提交</button>
            </div>
        </div>
    <?php 
ActiveForm::end();
?>
</div>
Example #2
0
        <header class="panel-heading bg-light">
            <ul class="nav nav-tabs pull-right">
            <li class="active"><a href="#basic" data-toggle="tab" aria-expanded="true"><i class="fa fa-comments text-muted"></i> 基本信息</a></li>
            <li class=""><a href="#description" data-toggle="tab" aria-expanded="false"><i class="fa fa-user text-muted"></i> 描述</a></li>
            <li class=""><a href="#picture" data-toggle="tab" aria-expanded="false"><i class="fa fa-cog text-muted"></i> 图片</a></li>
            </ul>
            <span class="hidden-sm"><?php 
echo $this->title;
?>
</span>
        </header>
        <div class="panel-body">
            <div class="tab-content">              
            <div class="tab-pane active" id="basic">
                <?php 
echo $form->field($model, 'category_id')->dropDownList(ProductCategory::getTreeIdNameList(), ['class' => ['class' => 'chosen-select form-control']]);
?>
            
                <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
                
                <?php 
echo $form->field($model, 'code')->textInput(['maxlength' => true]);
?>
                
                <?php 
echo $form->field($model, 'inventory')->input('number');
?>
            
                <?php