summaryrefslogtreecommitdiff
path: root/app/Template/task_creation
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-02 17:01:27 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-02 17:01:27 -0500
commit3833c12ccce59bcc49c4cfa892401973558f604d (patch)
treeb67b0e10cdc3d42e5626f728206138a444a40ed0 /app/Template/task_creation
parentd49ce63e51f596ad3bf0d02b689aea673cf544f8 (diff)
Refactoring/rewrite of modal boxes handling
Diffstat (limited to 'app/Template/task_creation')
-rw-r--r--app/Template/task_creation/duplicate_projects.php9
-rw-r--r--app/Template/task_creation/show.php40
2 files changed, 22 insertions, 27 deletions
diff --git a/app/Template/task_creation/duplicate_projects.php b/app/Template/task_creation/duplicate_projects.php
index dc0fa105..202b3ffe 100644
--- a/app/Template/task_creation/duplicate_projects.php
+++ b/app/Template/task_creation/duplicate_projects.php
@@ -5,10 +5,10 @@
<?php if (empty($projects_list)): ?>
<p class="alert"><?= t('There is no destination project available.') ?></p>
<div class="form-actions">
- <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover btn') ?>
+ <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'js-modal-close btn') ?>
</div>
<?php else: ?>
- <form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'duplicateProjects', array('project_id' => $task['project_id'])) ?>" autocomplete="off">
+ <form method="post" action="<?= $this->url->href('TaskCreationController', 'duplicateProjects', array('project_id' => $task['project_id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('task_id', $values) ?>
@@ -20,9 +20,6 @@
array('multiple')
) ?>
- <div class="form-actions">
- <button type="submit" class="btn btn-blue"><?= t('Duplicate') ?></button>
- <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
- </div>
+ <?= $this->modal->submitButtons() ?>
</form>
<?php endif ?>
diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php
index 840d1804..56e4b398 100644
--- a/app/Template/task_creation/show.php
+++ b/app/Template/task_creation/show.php
@@ -1,50 +1,48 @@
<div class="page-header">
<h2><?= $this->text->e($project['name']) ?> &gt; <?= t('New task') ?><?= $this->task->getNewTaskDropdown($project['id'], $values['swimlane_id'], $values['column_id']) ?></h2>
</div>
-
-<form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <div class="form-columns">
- <div class="form-column">
+ <div class="task-form-container">
+ <div class="task-form-main-column">
<?= $this->task->selectTitle($values, $errors) ?>
<?= $this->task->selectDescription($values, $errors) ?>
<?= $this->task->selectTags($project) ?>
-
+
<?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?>
-
- <?php if (! isset($duplicate)): ?>
- <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
- <?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1) ?>
- <?php endif ?>
</div>
- <div class="form-column">
- <?= $this->form->hidden('project_id', $values) ?>
+ <div class="task-form-secondary-column">
<?= $this->task->selectColor($values) ?>
<?= $this->task->selectAssignee($users_list, $values, $errors) ?>
<?= $this->task->selectCategory($categories_list, $values, $errors) ?>
<?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?>
<?= $this->task->selectColumn($columns_list, $values, $errors) ?>
<?= $this->task->selectPriority($project, $values) ?>
- <?= $this->task->selectScore($values, $errors) ?>
- <?= $this->task->selectReference($values, $errors) ?>
<?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?>
</div>
- <div class="form-column">
+ <div class="task-form-secondary-column">
+ <?= $this->task->selectDueDate($values, $errors) ?>
+ <?= $this->task->selectStartDate($values, $errors) ?>
<?= $this->task->selectTimeEstimated($values, $errors) ?>
<?= $this->task->selectTimeSpent($values, $errors) ?>
- <?= $this->task->selectStartDate($values, $errors) ?>
- <?= $this->task->selectDueDate($values, $errors) ?>
+ <?= $this->task->selectScore($values, $errors) ?>
+ <?= $this->task->selectReference($values, $errors) ?>
<?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?>
</div>
- </div>
- <div class="form-actions">
- <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button>
- <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?>
+ <div class="task-form-bottom">
+ <?php if (! isset($duplicate)): ?>
+ <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
+ <?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1) ?>
+ <?php endif ?>
+
+ <?= $this->modal->submitButtons() ?>
+ </div>
</div>
</form>