69 lines
1.9 KiB
PHP
Raw Normal View History

2021-11-23 13:13:19 +03:00
<?php
2021-12-20 17:49:11 +03:00
use backend\modules\card\models\UserCard;
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 */
/* @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(); ?>
<?= $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,
[
2023-04-25 01:32:15 +03:00
'data' => \common\models\UserCard::getListUserWithUserId(),
'options' => ['placeholder' => '...', 'class' => 'form-control'],
'pluginOptions' => [
2023-04-25 01:32:15 +03:00
'allowClear' => true
],
]
); ?>
2021-11-23 13:13:19 +03:00
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
<?= $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,
[
2023-04-25 01:32:15 +03:00
'data' => \common\models\ProjectColumn::find()->select(['title', 'id'])->indexBy('id')->column(),
'options' => ['placeholder' => '...','class' => 'form-control'],
'pluginOptions' => [
'allowClear' => true,
'prompt' => 'Выберите'
],
]
); ?>
2021-11-23 13:13:19 +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">
<?= Html::submitButton('Создать', ['class' => 'btn btn-success']) ?>
2021-11-23 13:13:19 +03:00
</div>
<?php ActiveForm::end(); ?>
</div>