From 20d113b1db56930a35a1646532aa7dd83a7ba42f Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 16 Jul 2021 17:00:21 +0200 Subject: [PATCH] rdv: some fixes for the new rdv --- src/Bundle/ChillCalendarBundle/Form/CalendarType.php | 11 ++++++++++- .../Repository/CalendarRangeRepository.php | 2 +- .../Resources/views/Calendar/new.html.twig | 4 ---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php index c83fd9859..44a627ed2 100644 --- a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php +++ b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php @@ -7,6 +7,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Chill\MainBundle\Form\Type\CommentType; use Chill\CalendarBundle\Entity\Calendar; @@ -46,9 +47,17 @@ class CalendarType extends AbstractType 'required' => false, 'class' => CancelReason::class, 'choice_label' => function (CancelReason $entity) { - return $this->translatableStringHelper->localize($entity->getName()); + return $this->translatableStringHelper->localize($entity->getCanceledBy()); }, )) + ->add('sendSMS', ChoiceType::class, array( + 'required' => false, + 'choices' => array( + 'Oui' => true, + 'Non' => false + ), + 'expanded' => true + )) ; }/** diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php index a2c542436..152c0f097 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php @@ -2,7 +2,7 @@ namespace Chill\CalendarBundle\Repository; -use CalendarBundle\Entity\CalendarRange; +use Chill\CalendarBundle\Entity\CalendarRange; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig index ebb9ac911..84811aaf4 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/new.html.twig @@ -45,10 +45,6 @@ {{ form_row(form.comment) }} {% endif %} -{%- if form.activity is defined -%} - {{ form_row(form.activity) }} -{% endif %} - {%- if form.sendSMS is defined -%} {{ form_row(form.sendSMS) }} {% endif %}