mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
Merge branch 'features/activity-model' into features/activity-form
This commit is contained in:
33
src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php
Normal file
33
src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\ActivityBundle\Form;
|
||||
|
||||
use Chill\ActivityBundle\Entity\ActivityPresence;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
||||
|
||||
class ActivityPresenceType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class)
|
||||
->add('active', ChoiceType::class, array(
|
||||
'choices' => array(
|
||||
'Yes' => true,
|
||||
'No' => false
|
||||
),
|
||||
'expanded' => true
|
||||
));
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
'data_class' => ActivityPresence::class
|
||||
));
|
||||
}
|
||||
}
|
@@ -43,9 +43,9 @@ class ActivityTypeType extends AbstractType
|
||||
|
||||
$fields = [
|
||||
'persons', 'user', 'date', 'place', 'persons',
|
||||
'thirdParties', 'durationTime', 'attendee',
|
||||
'thirdParties', 'durationTime', 'travelTime', 'attendee',
|
||||
'reasons', 'comment', 'sentReceived', 'documents',
|
||||
'emergency', 'accompanyingPeriod', 'socialData'
|
||||
'emergency', 'accompanyingPeriod', 'socialData', 'users'
|
||||
];
|
||||
foreach ($fields as $field) {
|
||||
$builder
|
||||
|
Reference in New Issue
Block a user