diff --git a/changelog.md b/changelog.md index 689016d..ce49733 100644 --- a/changelog.md +++ b/changelog.md @@ -98,4 +98,5 @@ #### Fix - Fix changelog - Delete useless alert area div -- Fix label of submit button in task add form \ No newline at end of file +- Fix label of submit button in task add form +- Fix task edition page \ No newline at end of file diff --git a/src/Controller/TaskController.php b/src/Controller/TaskController.php index 1fef477..b00f3ee 100644 --- a/src/Controller/TaskController.php +++ b/src/Controller/TaskController.php @@ -136,6 +136,7 @@ $entityManager->persist($task); $entityManager->flush(); return $this->ajaxFormAnswer([ + 'message' => 'Modification enregistrées', 'refresh' => true, ]); } else { @@ -159,6 +160,13 @@ return $this->ajaxFormAnswer([ 'redirect' => $this->generateUrl('task_tasks', [], UrlGenerator::ABSOLUTE_PATH), ]); + } else { + return $this->ajaxFormAnswer([ + 'redirect' => $this->generateUrl('activity_activity', [ + 'id' => $task->getActivity() + ->getId() + ], UrlGenerator::ABSOLUTE_PATH), + ]); } return $this->ajaxFormAnswer([ 'error' => 'Tâche non trouvé', diff --git a/templates/_includes/html/arrays/activityTasks.html.twig b/templates/_includes/html/arrays/activityTasks.html.twig new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/templates/_includes/html/arrays/activityTasks.html.twig