mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
add ordering on some social work + minor improves
This commit is contained in:
@@ -22,6 +22,7 @@ use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -60,11 +61,15 @@ class SocialActionType extends AbstractType
|
||||
return $this->translatableStringHelper->localize($issue->getTitle());
|
||||
},
|
||||
])
|
||||
|
||||
->add('ordering', NumberType::class, [
|
||||
'required' => true,
|
||||
'scale' => 6,
|
||||
])
|
||||
->add('results', EntityType::class, [
|
||||
'class' => Result::class,
|
||||
'required' => false,
|
||||
'multiple' => true,
|
||||
'attr' => ['class' => 'select2'],
|
||||
'choice_label' => function (Result $r) {
|
||||
return $this->translatableStringHelper->localize($r->getTitle());
|
||||
},
|
||||
@@ -74,6 +79,7 @@ class SocialActionType extends AbstractType
|
||||
'class' => Goal::class,
|
||||
'required' => false,
|
||||
'multiple' => true,
|
||||
'attr' => ['class' => 'select2'],
|
||||
'choice_label' => function (Goal $g) {
|
||||
return $this->translatableStringHelper->localize($g->getTitle());
|
||||
},
|
||||
@@ -83,6 +89,7 @@ class SocialActionType extends AbstractType
|
||||
'class' => Evaluation::class,
|
||||
'required' => false,
|
||||
'multiple' => true,
|
||||
'attr' => ['class' => 'select2'],
|
||||
'choice_label' => function (Evaluation $e) {
|
||||
return $this->translatableStringHelper->localize($e->getTitle());
|
||||
},
|
||||
|
@@ -17,6 +17,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -41,6 +42,10 @@ class SocialIssueType extends AbstractType
|
||||
'required' => false,
|
||||
'choice_label' => fn (SocialIssue $issue): ?string => $this->translatableStringHelper->localize($issue->getTitle()),
|
||||
])
|
||||
->add('ordering', NumberType::class, [
|
||||
'required' => true,
|
||||
'scale' => 6,
|
||||
])
|
||||
->add('desactivationDate', ChillDateType::class, [
|
||||
'label' => 'goal.desactivationDate',
|
||||
'required' => false,
|
||||
|
Reference in New Issue
Block a user