Commit c23bfbe5 by Yvon

rework two previous commits so that changes are applied only for tav instance

parent 05609179
...@@ -16,11 +16,13 @@ class UserInfosFormType extends AbstractType ...@@ -16,11 +16,13 @@ class UserInfosFormType extends AbstractType
{ {
protected $em; protected $em;
protected $security; protected $security;
protected $container;
public function __construct(EntityManagerInterface $em, Security $security) public function __construct(EntityManagerInterface $em, Security $security, ContainerInterface $container)
{ {
$this->em = $em; $this->em = $em;
$this->security = $security; $this->security = $security;
$this->container = $container;
} }
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
...@@ -30,12 +32,12 @@ class UserInfosFormType extends AbstractType ...@@ -30,12 +32,12 @@ class UserInfosFormType extends AbstractType
->add('firstname', TextType::class, [ ->add('firstname', TextType::class, [
'label' => 'Prénom', 'label' => 'Prénom',
'required' => false, 'required' => false,
'disabled' => $this->security->isGranted('ROLE_ADHERENT'), 'disabled' => $this->container->getParameter('tav_env') && $this->security->isGranted('ROLE_ADHERENT'),
]) ])
->add('lastname', TextType::class, [ ->add('lastname', TextType::class, [
'label' => 'Nom', 'label' => 'Nom',
'required' => false, 'required' => false,
'disabled' => $this->security->isGranted('ROLE_ADHERENT'), 'disabled' => $this->container->getParameter('tav_env') && $this->security->isGranted('ROLE_ADHERENT'),
]) ])
->add('email', EmailType::class, [ ->add('email', EmailType::class, [
'label' => 'Courriel', 'label' => 'Courriel',
......
...@@ -9,8 +9,16 @@ ...@@ -9,8 +9,16 @@
{% else %} {% else %}
{% include '@kohinos/adherent/block/demande_achat_monnaie.html.twig' %} {% include '@kohinos/adherent/block/demande_achat_monnaie.html.twig' %}
{% endif %} {% endif %}
{% if not tav_env %}
{% include '@kohinos/adherent/block/transaction_presta.html.twig' %}
{% include '@kohinos/adherent/block/transaction_adherent.html.twig' %}
{% endif %}
{# {% include '@kohinos/block/transactions.html.twig' %} #} {# {% include '@kohinos/block/transactions.html.twig' %} #}
{% include '@kohinos/block/operations.html.twig' %} {% include '@kohinos/block/operations.html.twig' %}
{% if not tav_env %}
{% include '@kohinos/block/cotisations.html.twig' %}
{% include '@kohinos/adherent/block/infos.html.twig' %}
{% endif %}
{% if KOH_USE_SOLIDOUME|default('false') == 'true' and getSolidoumeParam('name')|default('') is not null %} {% if KOH_USE_SOLIDOUME|default('false') == 'true' and getSolidoumeParam('name')|default('') is not null %}
{% include '@kohinos/adherent/block/solidoume.html.twig' %} {% include '@kohinos/adherent/block/solidoume.html.twig' %}
{% endif %} {% endif %}
\ No newline at end of file
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