2021-11-23 14:58:28 +03:00
|
|
|
<?php
|
|
|
|
|
2021-12-20 17:49:11 +03:00
|
|
|
use backend\modules\card\models\UserCard;
|
2021-11-23 14:58:28 +03:00
|
|
|
use backend\modules\project\models\Project;
|
|
|
|
use common\models\User;
|
|
|
|
use kartik\select2\Select2;
|
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\widgets\ActiveForm;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $model backend\modules\project\models\ProjectUser */
|
|
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="project-user-form">
|
|
|
|
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
|
|
|
|
<?= $form->field($model, 'project_id')->widget(Select2::className(),
|
|
|
|
[
|
|
|
|
'data' => Project::find()->select(['name', 'id'])->indexBy('id')->column(),
|
|
|
|
'options' => ['placeholder' => '...','class' => 'form-control'],
|
|
|
|
'pluginOptions' => [
|
|
|
|
'allowClear' => true
|
|
|
|
],
|
|
|
|
]
|
|
|
|
) ?>
|
|
|
|
|
2021-12-20 17:49:11 +03:00
|
|
|
<?= $form->field($model, 'card_id')->widget(Select2::className(),
|
2021-11-23 14:58:28 +03:00
|
|
|
[
|
2021-12-20 17:49:11 +03:00
|
|
|
'data' => UserCard::find()->select(['fio', 'id'])->indexBy('id')->column(),
|
2021-11-23 14:58:28 +03:00
|
|
|
'options' => ['placeholder' => '...','class' => 'form-control'],
|
|
|
|
'pluginOptions' => [
|
2021-12-10 10:53:43 +03:00
|
|
|
'allowClear' => true,
|
2021-12-16 17:14:33 +03:00
|
|
|
'multiple' => true,
|
2021-11-23 14:58:28 +03:00
|
|
|
],
|
|
|
|
]
|
|
|
|
) ?>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
|
|
|
|
</div>
|