示例#1
0
echo $form->field($model, 'id_category')->dropDownList(ArrayHelper::map(Category::find()->all(), 'id_category', 'nm_category'), ['style' => 'width:200px;']);
?>

            <?php 
echo $form->field($model, 'id_group')->dropDownList(ArrayHelper::map(ProductGroup::find()->all(), 'id_group', 'nm_group'), ['style' => 'width:200px;']);
?>

        </div>
        <div class="box-footer">
            <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>
</div>
<style>
    .tab-content {
        border: 1px #e0e0e0 solid;
        border-top: none;
        padding: 20px;
    }
</style>
<div class="col-lg-6">
    <div class="nav-tabs-custom">
        <?php 
echo MyTabs::widget(['contentOption' => ['class' => 'tab-content no-border no-padding'], 'items' => [['label' => 'Uoms', 'content' => GridView::widget(['dataProvider' => new ActiveDataProvider(['query' => $model->getProductUoms()]), 'tableOptions' => ['class' => 'table table-striped'], 'layout' => '{items}', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'idUom.nm_uom', 'idUom.cd_uom', 'isi']])], ['label' => 'Barcode', 'content' => GridView::widget(['dataProvider' => new ActiveDataProvider(['query' => $model->getBarcodes()]), 'tableOptions' => ['class' => 'table table-striped'], 'layout' => '{items}', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'barcode']])]]]);
?>
    </div>
</div>
<?php 
ActiveForm::end();
示例#2
0
?>
        </div>
    </div>
</div>
<div class="col-lg-6">
    <style>
        .tab-content {
            border: 1px #e0e0e0 solid;
            border-top: none;
            padding: 20px;
        }
    </style>
    <?php 
Pjax::begin(['id' => 'pjax', 'enablePushState' => false, 'clientOptions' => ['url' => \yii\helpers\Url::canonical()]]);
?>
    <?php 
echo Html::beginForm('', 'post', ['id' => 'input-form', 'data-pjax' => '#pjax']);
?>
    <div class="nav-tabs-custom">
        <?php 
echo Html::hiddenInput('action');
?>
        <?php 
echo MyTabs::widget(['contentOption' => ['class' => 'tab-content no-border no-padding'], 'items' => [['label' => 'Uoms', 'content' => $this->render('_form_uom', ['model' => $model]), 'active' => $active == 'uom'], ['label' => 'Barcode Alias', 'content' => $this->render('_form_barcode', ['model' => $model]), 'active' => $active == 'barcode']]]);
?>
    </div>
</div>
<?php 
echo Html::endForm();
Pjax::end();
\biz\app\assets\BizAsset::register($this);