Commit 1d1f8f4c by Damien Moulard

Merge branch 'develop'

parents 04256bc6 c9270a70
......@@ -172,8 +172,20 @@ class AdherentAdmin extends AbstractAdmin
;
if ($this->getConfigurationPool()->getContainer()->getParameter('tav_env')) {
// For Comptoir role in edit mode, hide profile choice
$displayProfilChoice = true;
$isComptoirOnly =
$this->security->isGranted('ROLE_COMPTOIR')
&& !$this->isGranted('ROLE_ADMIN')
&& !$this->isGranted('ROLE_SUPER_ADMIN')
&& !$this->isGranted('ROLE_ADMIN_SIEGE');
if ($isComptoirOnly && $this->isCurrentRoute('edit')) {
$displayProfilChoice = false;
}
$formMapper
if ($displayProfilChoice) {
$formMapper
->tab('General')
->with('Informations de cotisation', ['class' => 'col-md-5'])
->add('profilDeCotisation', ChoiceType::class, [
......@@ -190,6 +202,13 @@ class AdherentAdmin extends AbstractAdmin
return $choice->__toString();
}
])
->end()
->end();
}
$formMapper
->tab('General')
->with('Informations de cotisation', ['class' => 'col-md-5'])
->add('moyenDePaiement', ChoiceType::class, [
'required' => true,
'label' => 'Moyen de paiement :',
......
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