2021-11-23 13:13:19 +03:00
|
|
|
<?php
|
|
|
|
|
2021-12-20 17:49:11 +03:00
|
|
|
use backend\modules\card\models\UserCard;
|
2021-11-24 13:05:12 +03:00
|
|
|
use backend\modules\project\models\Project;
|
|
|
|
use common\helpers\StatusHelper;
|
|
|
|
use kartik\select2\Select2;
|
2021-11-23 13:13:19 +03:00
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\widgets\ActiveForm;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
2023-01-18 15:30:38 +03:00
|
|
|
/* @var $model backend\modules\task\models\ProjectTask */
|
2021-11-23 13:13:19 +03:00
|
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="task-form">
|
|
|
|
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
|
2021-11-24 13:05:12 +03:00
|
|
|
<?= $form->field($model, 'project_id')->dropDownList(Project::find()
|
|
|
|
->select(['name', 'id'])->indexBy('id')->column(),
|
|
|
|
[
|
|
|
|
'prompt' => 'Выберите'
|
|
|
|
]
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
|
2023-04-25 01:32:15 +03:00
|
|
|
<?= $form->field($model, 'user_id')->widget(
|
|
|
|
Select2::class,
|
2021-11-24 13:05:12 +03:00
|
|
|
[
|
2023-04-25 01:32:15 +03:00
|
|
|
'data' => \common\models\UserCard::getListUserWithUserId(),
|
|
|
|
'options' => ['placeholder' => '...', 'class' => 'form-control'],
|
2021-11-24 13:05:12 +03:00
|
|
|
'pluginOptions' => [
|
2023-04-25 01:32:15 +03:00
|
|
|
'allowClear' => true
|
2021-12-06 15:13:31 +03:00
|
|
|
],
|
2021-11-24 13:05:12 +03:00
|
|
|
]
|
|
|
|
); ?>
|
2021-11-23 13:13:19 +03:00
|
|
|
|
|
|
|
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
|
|
|
|
|
2021-11-24 13:05:12 +03:00
|
|
|
<?= $form->field($model, 'status')->dropDownList(
|
|
|
|
StatusHelper::statusList(),
|
|
|
|
[
|
|
|
|
'prompt' => 'Выберите'
|
|
|
|
]
|
|
|
|
) ?>
|
2021-11-23 13:13:19 +03:00
|
|
|
|
2023-04-25 01:32:15 +03:00
|
|
|
<?= $form->field($model, 'column_id')->widget(Select2::class,
|
2021-12-06 15:13:31 +03:00
|
|
|
[
|
2023-04-25 01:32:15 +03:00
|
|
|
'data' => \common\models\ProjectColumn::find()->select(['title', 'id'])->indexBy('id')->column(),
|
2021-12-06 15:13:31 +03:00
|
|
|
'options' => ['placeholder' => '...','class' => 'form-control'],
|
|
|
|
'pluginOptions' => [
|
|
|
|
'allowClear' => true,
|
|
|
|
'prompt' => 'Выберите'
|
|
|
|
],
|
|
|
|
]
|
|
|
|
); ?>
|
2021-11-23 13:13:19 +03:00
|
|
|
|
2021-12-06 15:13:31 +03:00
|
|
|
<?= $form->field($model, 'description')->textarea(['rows' => '6']) ?>
|
2021-11-23 13:13:19 +03:00
|
|
|
|
2023-05-12 02:12:43 +03:00
|
|
|
<?= $form->field($model, 'priority')->input('number') ?>
|
|
|
|
|
2021-11-23 13:13:19 +03:00
|
|
|
<div class="form-group">
|
2021-12-06 15:13:31 +03:00
|
|
|
<?= Html::submitButton('Создать', ['class' => 'btn btn-success']) ?>
|
2021-11-23 13:13:19 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
|
|
|
|
</div>
|