php use yii helpers Html use yii bootstrap ActiveForm div class shop-a

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
?>
<div class="shop-addcat">
<p>
<?= Html::a(Yii::t('app', 'SHOP_MY_GOODS'), ['mygoods'], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('app', 'SHOP_MY_STATS'), ['mystatistic'], ['class' => 'btn btn-primary']) ?>
</p>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'form-added']); ?>
<?php $form = ActiveForm::begin(['id' => 'form-added']); ?>
<?= $form->field($model, 'name')->input('text') ?>
<?= $form->field($model, 'description')->textarea() ?>
<?= $form->field($model, 'price') ?>
<?= $form->field($model, 'category')->dropDownList($model->getCategories());?>
<div class="form-group">
<?= Html::submitButton(Yii::t('app', 'BUTTON_ADDED'), ['class' => 'btn btn-primary', 'name' => 'added-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>