mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 10:29:42 +00:00
Add translation, make reason required, and change template for form
This commit is contained in:
@@ -163,6 +163,11 @@ class CalendarController extends AbstractController
|
|||||||
|
|
||||||
public function cancelAction(Calendar $calendar, Request $request): Response
|
public function cancelAction(Calendar $calendar, Request $request): Response
|
||||||
{
|
{
|
||||||
|
// Add voter
|
||||||
|
// Deal with sms being sent or not
|
||||||
|
// Communicate cancellation with the remote calendar.
|
||||||
|
|
||||||
|
|
||||||
$this->denyAccessUnlessGranted(CalendarVoter::EDIT, $calendar);
|
$this->denyAccessUnlessGranted(CalendarVoter::EDIT, $calendar);
|
||||||
|
|
||||||
[$person, $accompanyingPeriod] = [$calendar->getPerson(), $calendar->getAccompanyingPeriod()];
|
[$person, $accompanyingPeriod] = [$calendar->getPerson(), $calendar->getAccompanyingPeriod()];
|
||||||
@@ -183,10 +188,11 @@ class CalendarController extends AbstractController
|
|||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
$this->em->persist($calendar);
|
|
||||||
|
$calendar->setStatus($calendar::STATUS_CANCELED);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
|
||||||
$this->addFlash('success', $this->translator->trans('calender.calendar item has been canceled!'));
|
$this->addFlash('success', $this->translator->trans('chill_calendar.calendar_canceled'));
|
||||||
|
|
||||||
return new RedirectResponse($redirectRoute);
|
return new RedirectResponse($redirectRoute);
|
||||||
}
|
}
|
||||||
|
@@ -49,6 +49,7 @@ chill_calendar:
|
|||||||
cancel_calendar_item: Annuler rendez-vous
|
cancel_calendar_item: Annuler rendez-vous
|
||||||
calendar_canceled: Le rendez-vous a été annulé
|
calendar_canceled: Le rendez-vous a été annulé
|
||||||
cancel_calendar_item: Annuler rendez-vous
|
cancel_calendar_item: Annuler rendez-vous
|
||||||
|
calendar_canceled: Le rendez-vous a été annulé
|
||||||
Document: Document d'un rendez-vous
|
Document: Document d'un rendez-vous
|
||||||
form:
|
form:
|
||||||
The main user is mandatory. He will organize the appointment.: L'utilisateur principal est obligatoire. Il est l'organisateur de l'événement.
|
The main user is mandatory. He will organize the appointment.: L'utilisateur principal est obligatoire. Il est l'organisateur de l'événement.
|
||||||
|
Reference in New Issue
Block a user