diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index 5e5746387..9ce15e682 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -139,10 +139,9 @@ class CalendarController extends AbstractController $this->addFlash('success', $this->get('translator')->trans('Success : calendar item created!')); - $params = $this->buildParamsToUrl($user, $accompanyingPeriod); //TODO useful? - $params['id'] = $entity->getId(); + $params = $this->buildParamsToUrl($user, $accompanyingPeriod); - return $this->redirectToRoute('chill_calendar_calendar_show', $params); + return $this->redirectToRoute('chill_calendar_calendar', $params); } elseif ($form->isSubmitted() and !$form->isValid()) { $this->addFlash('error', $this->get('translator')->trans('This form contains errors')); } @@ -241,8 +240,7 @@ class CalendarController extends AbstractController $this->addFlash('success', $this->get('translator')->trans('Success : calendar item updated!')); $params = $this->buildParamsToUrl($user, $accompanyingPeriod); - $params['id'] = $id; - return $this->redirectToRoute('chill_calendar_calendar_show', $params); + return $this->redirectToRoute('chill_calendar_calendar', $params); } elseif ($form->isSubmitted() and !$form->isValid()) { $this->addFlash('error', $this->get('translator')->trans('This form contains errors')); } @@ -304,7 +302,7 @@ class CalendarController extends AbstractController $em->flush(); $this->addFlash('success', $this->get('translator') - ->trans("The calendar has been successfully removed.")); + ->trans("The calendar item has been successfully removed.")); $params = $this->buildParamsToUrl($user, $accompanyingPeriod); return $this->redirectToRoute('chill_calendar_calendar', $params); diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig index 028111079..1bbdc53ca 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig @@ -51,9 +51,9 @@ {{ 'Cancel'|trans|chill_return_path_label }} diff --git a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml index e77624061..e111f3c12 100644 --- a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml @@ -18,3 +18,5 @@ sendSMS: Envoi d'un SMS Send s m s: Envoi d'un SMS ? Cancel reason: Motif d'annulation Add a new calendar: Ajouter un nouveau rendez-vous +"Success : calendar item updated!": "Rendez-vous mis à jour" +The calendar item has been successfully removed.: Le rendez-vous a été supprimé