Commit 7ff024ff by Yvon

reorganize adherent sections to avoid gap on left column

parent 30837ed3
......@@ -175,6 +175,21 @@ class AdherentAdmin extends AbstractAdmin
;
if ($this->getConfigurationPool()->getContainer()->getParameter('tav_env')) {
if ($this->getConfigurationPool()->getContainer()->getParameter('household_based_allowance')) {
$formMapper
->tab('General')
->with('Foyer', ['class' => 'col-md-7'])
->add('dependentChildren', CollectionType::class, [
'entry_type' => DependentChildFormType::class,
'entry_options' => ['label' => true, 'data_class' => DependentChild::class],
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
'label' => "Enfant(s) à charge"
])
->end()
->end();
}
// For Comptoir role in edit mode, hide profile choice
$displayProfilChoice = true;
$isComptoirOnly =
......@@ -263,23 +278,6 @@ class AdherentAdmin extends AbstractAdmin
}
}
if ($this->getConfigurationPool()->getContainer()->getParameter('tav_env')
&& $this->getConfigurationPool()->getContainer()->getParameter('household_based_allowance')) {
$formMapper
->tab('General')
->with('Foyer', ['class' => 'col-md-7'])
->add('dependentChildren', CollectionType::class, [
'entry_type' => DependentChildFormType::class,
'entry_options' => ['label' => true, 'data_class' => DependentChild::class],
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
'label' => "Enfant(s) à charge"
])
->end()
->end();
}
$em = $this->getConfigurationPool()->getContainer()->get('doctrine')->getManager();
$formMapper->getFormBuilder()->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($em) {
$adherent = $event->getData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment