mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
Add first step to select Activity Type
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\ActivityBundle\Form;
|
||||
|
||||
use Chill\ActivityBundle\Form\Type\TranslatableActivityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivitySelectTypeType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('type', TranslatableActivityType::class, array(
|
||||
'placeholder' => 'Choose a type',
|
||||
'active_only' => true,
|
||||
'mapped' => false,
|
||||
));
|
||||
}
|
||||
}
|
@@ -15,7 +15,6 @@ use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTra
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Chill\ActivityBundle\Form\Type\TranslatableActivityType;
|
||||
use Chill\ActivityBundle\Form\Type\TranslatableActivityReason;
|
||||
use Chill\MainBundle\Form\Type\UserPickerType;
|
||||
@@ -24,7 +23,6 @@ use Chill\MainBundle\Form\Type\ChillDateType;
|
||||
|
||||
class ActivityType extends AbstractType
|
||||
{
|
||||
|
||||
/**
|
||||
* the user running this form
|
||||
*
|
||||
@@ -36,7 +34,7 @@ class ActivityType extends AbstractType
|
||||
*
|
||||
* @var AuthorizationHelper
|
||||
*/
|
||||
protected $authorizationHelper;
|
||||
protected AuthorizationHelper $authorizationHelper;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -113,10 +111,6 @@ class ActivityType extends AbstractType
|
||||
'multiple' => true,
|
||||
'required' => false,
|
||||
))
|
||||
->add('type', TranslatableActivityType::class, array(
|
||||
'placeholder' => 'Choose a type',
|
||||
'active_only' => true
|
||||
))
|
||||
->add('comment', CommentType::class, [
|
||||
'required' => false,
|
||||
])
|
||||
|
Reference in New Issue
Block a user