Commit 06c9424f authored by Jean-Baptiste Oellers's avatar Jean-Baptiste Oellers
Browse files

Correction bug creation activite

parent 63ce901c
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1380,6 +1380,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
            $project = null;
        }

        $organizationsCount = 0;
        if (!$this->getOscarUserContextService()->hasPrivileges(Privileges::ACTIVITY_CREATE)) {
            if (!$this->getOscarUserContextService()->hasPrivilegeInOrganizations(
                Privileges::ACTIVITY_CREATE
@@ -1389,7 +1390,8 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
            $organisationsUser = $this->getOscarUserContextService()->getCurrentUserOrganisationWithPrivilege(
                Privileges::ACTIVITY_CREATE
            );
            if (count($organisationsUser)) {
            $organizationsCount = count($organisationsUser);
            if ($organizationsCount) {
                $withOrganization = $organisationsUser;
                $rolesOrganizations = [];
                /** @var OrganizationRole $role */
@@ -1513,7 +1515,8 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
                'numerotationKeys'   => $numerotationKeys,
                'numbers_keys'       => $numerotationKeys,
                'allowNodeSelection' => $this->getOscarConfigurationService()->isAllowNodeSelection(),
                "tree"               => $this->getPersonService()->getProjectGrantService()->getActivityTypesTree()
                "tree"               => $this->getPersonService()->getProjectGrantService()->getActivityTypesTree(),
                'organizationsCount' => $organizationsCount,
            ]
        );

+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
            <p class="alert alert-danger"><?= $errorRoles ?></p>
            <?php endif; ?>
            <p class="alert alert-info">
                <?= ngettext("Choisissez un rôle pour votre structure.", "Choisisser au moins un rôle pour une de vos structures", count($organizations)) ?><br>
                <?= ngettext("Choisissez un rôle pour votre structure.", "Choisisser au moins un rôle pour une de vos structures", $organizationsCount) ?><br>
            </p>
            <?php foreach ($withOrganization as $org): ?>
                <label for="organization[<?= $org->getId() ?>]"><?= $org ?></label>