From 3833c12ccce59bcc49c4cfa892401973558f604d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 2 Jan 2017 17:01:27 -0500 Subject: Refactoring/rewrite of modal boxes handling --- app/Template/task_creation/duplicate_projects.php | 9 ++--- app/Template/task_creation/show.php | 40 +++++++++++------------ 2 files changed, 22 insertions(+), 27 deletions(-) (limited to 'app/Template/task_creation') 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 @@

- url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover btn') ?> + url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'js-modal-close btn') ?>
-
+ form->csrf() ?> form->hidden('task_id', $values) ?> @@ -20,9 +20,6 @@ array('multiple') ) ?> -
- - url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?>
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 @@ - -
+ form->csrf() ?> + form->hidden('project_id', $values) ?> -
-
+
+
task->selectTitle($values, $errors) ?> task->selectDescription($values, $errors) ?> task->selectTags($project) ?> - + hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> - - - form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> - form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1) ?> -
-
- form->hidden('project_id', $values) ?> +
task->selectColor($values) ?> task->selectAssignee($users_list, $values, $errors) ?> task->selectCategory($categories_list, $values, $errors) ?> task->selectSwimlane($swimlanes_list, $values, $errors) ?> task->selectColumn($columns_list, $values, $errors) ?> task->selectPriority($project, $values) ?> - task->selectScore($values, $errors) ?> - task->selectReference($values, $errors) ?> hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?>
-
+
+ task->selectDueDate($values, $errors) ?> + task->selectStartDate($values, $errors) ?> task->selectTimeEstimated($values, $errors) ?> task->selectTimeSpent($values, $errors) ?> - task->selectStartDate($values, $errors) ?> - task->selectDueDate($values, $errors) ?> + task->selectScore($values, $errors) ?> + task->selectReference($values, $errors) ?> hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?>
-
-
- - url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> +
+ + form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> + form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1) ?> + + + modal->submitButtons() ?> +
-- cgit v1.2.3