<div class="user-form"> <?php $form = ActiveForm::begin(['id' => 'user-update-form', 'options' => ['class' => 'form-horizontal'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-2']]]); ?> <?php echo $form->field($model, 'full_name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'email')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'role_id')->dropDownList(Role::getRolesArray()); ?> <?php echo $form->field($model, 'status')->dropDownList(User::getStatusesArray()); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>