-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Добавляет создание новых задач и показ этих задач внутри сделки
- Loading branch information
1 parent
ad3799c
commit 606c8ec
Showing
8 changed files
with
110 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,47 @@ | ||
<?php | ||
|
||
use frontend\models\Task; | ||
use frontend\models\TaskType; | ||
use frontend\models\User; | ||
use yii\helpers\ArrayHelper; | ||
use yii\widgets\ActiveForm; | ||
|
||
/** | ||
* @var Task $model | ||
* @var integer $deal_id | ||
*/ | ||
?> | ||
|
||
<div class="task-widget"><a class="button button--shadow task-widget__button js-create-task" href="#"><span>Новая задача</span></a> | ||
<div class="task-widget"> | ||
<a class="button button--shadow task-widget__button js-create-task" href="#"><span>Новая задача</span></a> | ||
<div class="alert task-widget__container js-task-widget"> | ||
<button class="alert__close button button--icon task-widget__close-button" type="button"> | ||
<svg width="24" height="24"> | ||
<use xlink:href="img/sprite.svg#x-circle"></use> | ||
<use xlink:href="/img/sprite.svg#x-circle"></use> | ||
</svg> | ||
</button> | ||
<div class="alert__content"><textarea class="textarea task-widget__textarea" rows="1" | ||
placeholder="Описание"></textarea> | ||
<form class="task-widget__form deal-form" method="POST"> | ||
<div class="task-widget__type"><select class="select"> | ||
<option value="0" placeholder="placeholder">Тип задачи</option> | ||
<option value="1">Разработка</option> | ||
<option value="2">Маркетинг</option> | ||
<option value="3">Дизайн</option> | ||
<option value="4">Аналитика</option> | ||
<option value="5">Копирайтинг</option> | ||
</select></div> | ||
<div class="task-widget__executor"><select class="select"> | ||
<option value="0" placeholder="placeholder">Исполнитель</option> | ||
<option value="1">Олег Иванов</option> | ||
<option value="2">Анна Михайлова</option> | ||
<option value="3">Алиса Федосеева</option> | ||
<option value="4">Влад Климов</option> | ||
<option value="5">Михайл Кочетков</option> | ||
<option value="6">Юрий Пономарев</option> | ||
<option value="7">Яна Светлова</option> | ||
</select></div> | ||
<div class="task-widget__date-wrapper"><input | ||
class="task-widget__input task-widget__input--date deal-form__field--date deal-form__field js-resizable" | ||
type="text" readonly="readonly" placeholder="Срок"/> | ||
<div class="task-widget__calendar-container"></div> | ||
</div> | ||
<button class="task-widget__button link" type="submit"><span>Добавить</span></button> | ||
</form> | ||
<div class="alert__content"> | ||
<?php $form = ActiveForm::begin(['method' => 'post', 'action' => ['tasks/create'], | ||
'fieldConfig' => ['template' => '{input}']]); ?> | ||
<?=$form->field($model, 'description') | ||
->textarea(['class' => 'textarea task-widget__textarea', 'rows' => 1, 'placeholder' => 'Описание']); ?> | ||
|
||
<div class="task-widget__form deal-form"> | ||
<?=$form->field($model, 'deal_id')->hiddenInput(['value' => $deal_id]); ?> | ||
<?=$form->field($model, 'type_id', ['options' => ['class' => 'task-widget__type']]) | ||
->dropDownList(ArrayHelper::map(TaskType::find()->all(), 'id', 'name'), ['class' => 'select', 'prompt' => 'Тип']); ?> | ||
|
||
<?=$form->field($model, 'executor_id', ['options' => ['class' => 'task-widget__executor']]) | ||
->dropDownList(ArrayHelper::map(User::find()->all(), 'id', 'name'), ['class' => 'select', 'prompt' => 'Исполнитель']); ?> | ||
|
||
<div class="task-widget__date-wrapper"> | ||
<?=$form->field($model, 'due_date') | ||
->input('text', ['class' => 'task-widget__input task-widget__input--date deal-form__field--date deal-form__field js-resizable', 'placeholder' => 'Срок']); ?> | ||
<div class="task-widget__calendar-container"></div> | ||
</div> | ||
<button class="task-widget__button link" type="submit"><span>Добавить</span></button> | ||
</div> | ||
<?php ActiveForm::end(); ?> | ||
</div> | ||
</div> | ||
</div> | ||
|