33 lines
828 B
PHP
33 lines
828 B
PHP
<?php
|
|
|
|
use common\models\User;
|
|
use yii\helpers\Html;
|
|
use yii\widgets\ActiveForm;
|
|
use kartik\select2\Select2;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model backend\modules\employee\models\Manager */
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
?>
|
|
|
|
<div class="manager-form">
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<?= $form->field($model, 'user_id')->widget(Select2::className(),
|
|
[
|
|
'data' => User::find()->select(['username', 'id'])->indexBy('id')->column(),
|
|
'options' => ['placeholder' => '...','class' => 'form-control'],
|
|
'pluginOptions' => [
|
|
'allowClear' => true
|
|
],
|
|
]) ?>
|
|
|
|
<div class="form-group">
|
|
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|