Commit ff060adc by Damien Moulard

add cotisation reminder in adherent admin page in simplified household mode

parent 0ce5691f
...@@ -340,33 +340,61 @@ class AdherentAdmin extends AbstractAdmin ...@@ -340,33 +340,61 @@ class AdherentAdmin extends AbstractAdmin
]) ])
->end() ->end()
->end(); ->end();
if ($simplified_household_based_allowance) {
$formMapper
->tab('General')
->with('Informations de cotisation', [
'class' => 'col-md-5',
'description' => $cotisSectionInfo
])
->add('mailRappelCotisation', CheckboxType::class, [
'required' => false,
'label' => 'Recevoir un rappel du paiement de ma cotisation par mail',
'attr' => [
'autocomplete' => 'off'
]
])
->add('jourMailRappelCotisation', ChoiceType::class, [
'required' => false,
'label' => 'Jour de l\'envoi du mail de rappel :',
'choices' => $this->daysOfMonth(),
'empty_data' => null,
'placeholder' => 'Choisir un jour pour l\'envoi du mail de rappel',
'attr' => [
'autocomplete' => 'off'
]
])
->end()
->end();
}
} else { } else {
// For Comptoir role in edit mode, hide profile choice // For Comptoir role in edit mode, hide profile choice
$displayProfilChoice = !($isComptoirOnly && $this->isCurrentRoute('edit')); $displayProfilChoice = !($isComptoirOnly && $this->isCurrentRoute('edit'));
if ($displayProfilChoice) { if ($displayProfilChoice) {
$formMapper $formMapper
->tab('General') ->tab('General')
->with('Informations de cotisation', ['class' => 'col-md-5']) ->with('Informations de cotisation', ['class' => 'col-md-5'])
->add('profilDeCotisation', ChoiceType::class, [ ->add('profilDeCotisation', ChoiceType::class, [
'required' => true, 'required' => true,
'label' => 'Choix du profil de cotisation :', 'label' => 'Choix du profil de cotisation :',
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(ProfilDeCotisation::class)->findBy([], ['montant' => 'ASC']), 'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(ProfilDeCotisation::class)->findBy([], ['montant' => 'ASC']),
'empty_data' => null, 'empty_data' => null,
'placeholder' => 'Choisir un profil', 'placeholder' => 'Choisir un profil',
'choice_label' => function ($choice, $key, $value) { 'choice_label' => function ($choice, $key, $value) {
if (null === $choice) { if (null === $choice) {
return ''; return '';
} }
return $choice->__toString(); return $choice->__toString();
}, },
'attr' => [ 'attr' => [
'autocomplete' => 'off' 'autocomplete' => 'off'
] ]
]) ])
->end() ->end()
->end(); ->end();
} }
$formMapper $formMapper
......
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