<?php use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel app\modules\store\models\OrderSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Заказ'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="order-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', ['attribute' => 'statusId', 'value' => 'statusTitle', 'filter' => \app\modules\store\models\Order::statusList()], 'fio', 'phone', 'email:email', 'dateCreate', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}']]]); ?> </div>
use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model app\modules\store\models\Order */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="order-form"> <div class="row"> <div class="col-md-6"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'statusId')->dropDownList(\app\modules\store\models\Order::statusList()); ?> <?php echo $form->field($model, 'fio')->textInput(['maxlength' => 128, 'readonly' => true]); ?> <?php echo $form->field($model, 'phone')->textInput(['maxlength' => 23, 'readonly' => true]); ?> <?php echo $form->field($model, 'email')->textInput(['maxlength' => 64, 'readonly' => true]); ?> <?php