fix modal issue
This commit is contained in:
parent
91304d95dc
commit
2dae055ae9
|
|
@ -171,7 +171,7 @@ export default class extends Controller {
|
||||||
this.modalTitleTarget.textContent = "Modifier l'organisation";
|
this.modalTitleTarget.textContent = "Modifier l'organisation";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`/organization/${this.currentOrgId}`);
|
const response = await fetch(`/organization/editModal/${this.currentOrgId}`);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
// Fill targets
|
// Fill targets
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ parameters:
|
||||||
oauth_sso_identifier: '%env(OAUTH_SSO_IDENTIFIER)%'
|
oauth_sso_identifier: '%env(OAUTH_SSO_IDENTIFIER)%'
|
||||||
oauth_sso_identifier_login: '%env(OAUTH_SSO_IDENTIFIER_LOGIN)%'
|
oauth_sso_identifier_login: '%env(OAUTH_SSO_IDENTIFIER_LOGIN)%'
|
||||||
easycheck_url: '%env(EASYCHECK_URL)%'
|
easycheck_url: '%env(EASYCHECK_URL)%'
|
||||||
|
webhook_secret: '%env(WEBHOOK_SECRET)%'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# default configuration for services in *this* file
|
# default configuration for services in *this* file
|
||||||
|
|
@ -59,11 +60,12 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
$environment: '%kernel.environment%'
|
$environment: '%kernel.environment%'
|
||||||
|
|
||||||
# add more service definitions when explicit configuration is needed
|
|
||||||
# please note that last definitions always *replace* previous ones
|
|
||||||
|
|
||||||
App\EventListener\LogoutSubscriber:
|
App\EventListener\LogoutSubscriber:
|
||||||
arguments:
|
arguments:
|
||||||
$easycheckUrl: '%env(EASYCHECK_URL)%'
|
$easycheckUrl: '%env(EASYCHECK_URL)%'
|
||||||
tags:
|
tags:
|
||||||
- { name: kernel.event_subscriber }
|
- { name: kernel.event_subscriber }
|
||||||
|
App\Webhook\OrganizationNotifier:
|
||||||
|
arguments:
|
||||||
|
$easycheckUrl: '%easycheck_url%'
|
||||||
|
$webhookSecret: '%webhook_secret%'
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ class OrganizationController extends AbstractController
|
||||||
/*
|
/*
|
||||||
* Path used to get data on an organization for the edit modal
|
* 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{
|
public function get(int $id): JsonResponse{
|
||||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||||
$actingUser = $this->getUser();
|
$actingUser = $this->getUser();
|
||||||
|
|
|
||||||
|
|
@ -414,5 +414,11 @@
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/messenger.yaml"
|
"config/packages/messenger.yaml"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"symfony/webhook": {
|
||||||
|
"version": "7.4",
|
||||||
|
"recipe": {
|
||||||
|
"version": "7.3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,49 +26,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# New organization modal #}
|
{# New organization modal #}
|
||||||
<div class="modal fade" id="createOrganizationModal" tabindex="-1" aria-labelledby="createOrganizationModalLabel"
|
{{ include('organization/organizationModal.html.twig') }}
|
||||||
aria-hidden="true"
|
|
||||||
data-organization-target="modal">
|
|
||||||
<div class="modal-dialog modal-lg">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="createOrganizationModalLabel">Créer une organisation</h5>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form data-action="submit->organization#createOrganization">
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="organizationName" class="form-label">Nom de l'organisation</label>
|
|
||||||
<input type="text" class="form-control" id="organizationName" name="name" required>
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="organizationEmail" class="form-label">Email</label>
|
|
||||||
<input class="form-control" id="organizationEmail" type="email" name="email" required>
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="organizationPhone" class="form-label">Téléphone</label>
|
|
||||||
<input class="form-control" type="number" id="organizationPhone" name="phone">
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="organizationAddress" class="form-label">Adresse</label>
|
|
||||||
<input class="form-control" id="organizationAddress" name="address">
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="form-label" for="organizationLogo">Logo de l'organisation</label>
|
|
||||||
<input type="file" name="logoUrl" id="organizationLogo" class="form-control"
|
|
||||||
accept="image/*">
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
|
||||||
Annuler
|
|
||||||
</button>
|
|
||||||
<button type="submit" class="btn btn-primary">Créer l'organisation</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% if is_granted('ROLE_SUPER_ADMIN') and not hasOrganizations %}
|
{% if is_granted('ROLE_SUPER_ADMIN') and not hasOrganizations %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue