rdv: some fixes for the new rdv

This commit is contained in:
nobohan 2021-07-16 17:00:21 +02:00
parent 114df16e0f
commit 20d113b1db
3 changed files with 11 additions and 6 deletions

View File

@ -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
))
;
}/**

View File

@ -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;

View File

@ -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 %}