Commit c9270a70 by Yvon Kerdoncuff

Merge branch 'limit-comptoir-cotis-profile-update' into 'develop'

hide profile choice for comptoir in adherent update

See merge request cooperatic/kohinos-tav!31
parents 0945f68e 277ed578
......@@ -172,7 +172,19 @@ 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;
}
if ($displayProfilChoice) {
$formMapper
->tab('General')
->with('Informations de cotisation', ['class' => 'col-md-5'])
......@@ -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