Skip to content
Snippets Groups Projects
Commit 9a90dd91 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction pour l'affichage des champs autres en respectant les privilèges activés

parent 5874164d
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
* @var $intervenant \Application\Entity\Db\Intervenant
* @var $intervenantDossier \Application\Entity\Db\IntervenantDossier
* @var $tblDossier \Application\Entity\Db\TblDossier
* @var $champsAutres \Application\Entity\Collection
* @var $champsAutres \Application\Entity\Db\DossierAutre[]
*/
$form->prepare();
$dossierAutres = $form->get('DossierAutres');
......@@ -43,8 +43,10 @@ $dossierAutres = $form->get('DossierAutres');
<div class="panel-body">
<?php foreach ($champsAutres as $champ): ?>
<?php if (!$this->isAllowed($intervenant, constant('Application\Assertion\IntervenantDossierAssertion::PRIV_EDIT_AUTRE' . $champ->getId()))): ?>
<?php if ($this->isAllowed($intervenant, constant('Application\Assertion\IntervenantDossierAssertion::PRIV_VIEW_AUTRE' . $champ->getId()))): ?>
<div class="form-group">
<?= $this->formLabel($dossierAutres->get('champ-autre-' . $champ->getId()),); ?>
<?php echo $this->formLabel($dossierAutres->get('champ-autre-' . $champ->getId()),); ?>
<div class="input-group cold-md-6 readonly">
<?php
$method = 'getAutre' . $champ->getId();
......@@ -56,6 +58,7 @@ $dossierAutres = $form->get('DossierAutres');
?>
</div>
</div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->formControlGroup($dossierAutres->get('champ-autre-' . $champ->getId())); ?>
<?php endif; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment