36 lines
863 B
PHP
36 lines
863 B
PHP
<?php
|
|
|
|
use backend\modules\card\models\UserCard;
|
|
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::class,
|
|
[
|
|
'data' => \common\models\UserCard::getListUserWithUserId(),
|
|
'options' => ['placeholder' => '...', 'class' => 'form-control'],
|
|
'pluginOptions' => [
|
|
'allowClear' => true
|
|
],
|
|
]
|
|
); ?>
|
|
|
|
<div class="form-group">
|
|
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|