From 2dae055ae95e2195116d8e03eb638727f8d51cc7 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 9 Mar 2026 10:06:46 +0100 Subject: [PATCH] fix modal issue --- assets/controllers/organization_controller.js | 2 +- config/services.yaml | 8 ++-- src/Controller/OrganizationController.php | 2 +- symfony.lock | 6 +++ templates/organization/index.html.twig | 44 +------------------ 5 files changed, 14 insertions(+), 48 deletions(-) diff --git a/assets/controllers/organization_controller.js b/assets/controllers/organization_controller.js index 6f14baf..a5fee79 100644 --- a/assets/controllers/organization_controller.js +++ b/assets/controllers/organization_controller.js @@ -171,7 +171,7 @@ export default class extends Controller { this.modalTitleTarget.textContent = "Modifier l'organisation"; try { - const response = await fetch(`/organization/${this.currentOrgId}`); + const response = await fetch(`/organization/editModal/${this.currentOrgId}`); const data = await response.json(); // Fill targets diff --git a/config/services.yaml b/config/services.yaml index b1d609b..85ccab2 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -14,6 +14,7 @@ parameters: oauth_sso_identifier: '%env(OAUTH_SSO_IDENTIFIER)%' oauth_sso_identifier_login: '%env(OAUTH_SSO_IDENTIFIER_LOGIN)%' easycheck_url: '%env(EASYCHECK_URL)%' + webhook_secret: '%env(WEBHOOK_SECRET)%' services: # default configuration for services in *this* file @@ -58,12 +59,13 @@ services: App\Command\CreateSuperAdminCommand: arguments: $environment: '%kernel.environment%' - - # add more service definitions when explicit configuration is needed - # please note that last definitions always *replace* previous ones App\EventListener\LogoutSubscriber: arguments: $easycheckUrl: '%env(EASYCHECK_URL)%' tags: - { name: kernel.event_subscriber } + App\Webhook\OrganizationNotifier: + arguments: + $easycheckUrl: '%easycheck_url%' + $webhookSecret: '%webhook_secret%' diff --git a/src/Controller/OrganizationController.php b/src/Controller/OrganizationController.php index e1ba3ed..bd09428 100644 --- a/src/Controller/OrganizationController.php +++ b/src/Controller/OrganizationController.php @@ -375,7 +375,7 @@ class OrganizationController extends AbstractController /* * Path used to get data on an organization for the edit modal */ - #[Route(path: '/{id}', name: 'get', methods: ['GET'])] + #[Route(path: '/editModal/{id}', name: 'get', methods: ['GET'])] public function get(int $id): JsonResponse{ $this->denyAccessUnlessGranted('ROLE_USER'); $actingUser = $this->getUser(); diff --git a/symfony.lock b/symfony.lock index ef08a57..da80953 100644 --- a/symfony.lock +++ b/symfony.lock @@ -414,5 +414,11 @@ "files": [ "config/packages/messenger.yaml" ] + }, + "symfony/webhook": { + "version": "7.4", + "recipe": { + "version": "7.3" + } } } diff --git a/templates/organization/index.html.twig b/templates/organization/index.html.twig index 143bb15..4d0cf9b 100644 --- a/templates/organization/index.html.twig +++ b/templates/organization/index.html.twig @@ -26,49 +26,7 @@ {% endif %} {# New organization modal #} - + {{ include('organization/organizationModal.html.twig') }}
{% if is_granted('ROLE_SUPER_ADMIN') and not hasOrganizations %}