guild/backend/modules/employee/views/manager/_form.php

36 lines
863 B
PHP
Raw Permalink Normal View History

2021-11-16 13:14:28 +03:00
<?php
use backend\modules\card\models\UserCard;
2021-11-16 13:14:28 +03:00
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(); ?>
2023-05-04 15:10:56 +03:00
<?= $form->field($model, 'user_id')->widget(
Select2::class,
2021-11-16 13:14:28 +03:00
[
2023-05-04 15:10:56 +03:00
'data' => \common\models\UserCard::getListUserWithUserId(),
'options' => ['placeholder' => '...', 'class' => 'form-control'],
2021-11-16 13:14:28 +03:00
'pluginOptions' => [
'allowClear' => true
],
2023-05-04 15:10:56 +03:00
]
); ?>
2021-11-16 13:14:28 +03:00
<div class="form-group">
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>