summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-11-26 16:00:52 -0500
committerFrederic Guillot <fred@kanboard.net>2016-11-26 16:00:52 -0500
commit04ff67e26b880dde8bfb6462f312cf434457cd46 (patch)
treea3961289cbe8c60ca524490df1716229c555b379 /app
parente64faae69aec404b2641b8ae281afe20806e8292 (diff)
Rewrite task move position component and remove Vuejs
Diffstat (limited to 'app')
-rw-r--r--app/Template/task_move_position/show.php55
1 files changed, 16 insertions, 39 deletions
diff --git a/app/Template/task_move_position/show.php b/app/Template/task_move_position/show.php
index c1a02484..91241016 100644
--- a/app/Template/task_move_position/show.php
+++ b/app/Template/task_move_position/show.php
@@ -2,45 +2,22 @@
<h2><?= t('Move task to another position on the board') ?></h2>
</div>
-<script type="x/template" id="template-task-move-position">
- <?= $this->form->label(t('Swimlane'), 'swimlane') ?>
- <select v-model="swimlaneId" @change="onChangeSwimlane()" id="form-swimlane">
- <option v-for="swimlane in board" v-bind:value="swimlane.id">
- {{ swimlane.name }}
- </option>
- </select>
+<form>
- <div v-if="columns.length > 0">
- <?= $this->form->label(t('Column'), 'column') ?>
- <select v-model="columnId" @change="onChangeColumn()" id="form-column">
- <option v-for="column in columns" v-bind:value="column.id">
- {{ column.title }}
- </option>
- </select>
- </div>
+<?= $this->app->component('task-move-position', array(
+ 'saveUrl' => $this->url->href('TaskMovePositionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
+ 'board' => $board,
+ 'swimlaneLabel' => t('Swimlane'),
+ 'columnLabel' => t('Column'),
+ 'positionLabel' => t('Position'),
+ 'beforeLabel' => t('Insert before this task'),
+ 'afterLabel' => t('Insert after this task'),
+)) ?>
- <div v-if="tasks.length > 0">
- <?= $this->form->label(t('Position'), 'position') ?>
- <select v-model="position" id="form-position">
- <option v-for="task in tasks" v-bind:value="task.position">#{{ task.id }} - {{ task.title }}</option>
- </select>
- <label><input type="radio" value="before" v-model="positionChoice"><?= t('Insert before this task') ?></label>
- <label><input type="radio" value="after" v-model="positionChoice"><?= t('Insert after this task') ?></label>
- </div>
+<?= $this->app->component('submit-cancel', array(
+ 'submitLabel' => t('Save'),
+ 'orLabel' => t('or'),
+ 'cancelLabel' => t('cancel'),
+)) ?>
- <div v-if="errorMessage">
- <div class="alert alert-error">{{ errorMessage }}</div>
- </div>
-
- <submit-cancel
- label-button="<?= t('Save') ?>"
- label-or="<?= t('or') ?>"
- label-cancel="<?= t('cancel') ?>"
- :callback="onSubmit">
- </submit-cancel>
-</script>
-
-<task-move-position
- save-url="<?= $this->url->href('TaskMovePositionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
- :board='<?= json_encode($board, JSON_HEX_APOS) ?>'
-></task-move-position>
+</form>