2021-11-23 13:13:19 +03:00
|
|
|
<?php
|
|
|
|
|
2021-11-24 13:05:12 +03:00
|
|
|
use backend\modules\task\models\Task;
|
|
|
|
use kartik\depdrop\DepDrop;
|
2021-11-23 13:13:19 +03:00
|
|
|
use yii\helpers\Html;
|
2021-11-24 13:05:12 +03:00
|
|
|
use yii\helpers\Url;
|
2021-11-23 13:13:19 +03:00
|
|
|
use yii\widgets\ActiveForm;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $model backend\modules\task\models\TaskUser */
|
|
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="task-user-form">
|
|
|
|
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
|
2021-11-24 13:05:12 +03:00
|
|
|
<?= $form->field($model, 'task_id')->dropDownList(Task::find()
|
|
|
|
->select(['title', 'id'])->indexBy('id')->column(),
|
|
|
|
[
|
|
|
|
'id' => 'task-id',
|
|
|
|
'prompt' => 'Выберите'
|
|
|
|
]
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?= $form->field($model, 'project_user_id')->widget(DepDrop::className(),
|
|
|
|
[
|
|
|
|
'options' => ['id' => 'project-user-id'],
|
|
|
|
'pluginOptions' => [
|
|
|
|
'depends' => ['task-id'],
|
|
|
|
'placeholder' => 'Выберите',
|
|
|
|
'url' => Url::to(['/task/task-user/executor'])
|
|
|
|
]
|
|
|
|
]
|
|
|
|
); ?>
|
2021-11-23 13:13:19 +03:00
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
|
|
|
|
</div>
|