{% extends 'front.html.twig' %}
{% block title %}Inscription | CIMEF-INTERNATIONAL{% endblock %}
{% block styleSheets %}
<!-- jQuery (OBLIGATOIRE avant Select2) -->
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
/* $(document).ready(function () {
let $thematique = $('#new_inscription_form_thematique');
let $theme = $('#new_inscription_form_theme');
let $lieu = $('#new_inscription_form_lieu');
let $periode = $('#new_inscription_form_periode');
let $prix = $('#new_inscription_form_prix');
$theme.hide();
$lieu.hide();
$periode.hide();
$prix.hide();
$thematique.on('change', function () {
let thematiqueVal = $(this).val();
if (thematiqueVal !== '') {
$theme.show();
$.ajax({
url: "{{ path('front.inscriptions', { annee: annee }) }}",
type: "POST",
data: { thematiqueVal: thematiqueVal },
dataType: "json",
success: function (response) {
if (response.thematique_id) {
$periode.show();
$('#new_inscription_form_periode').val(response.thematique_id).trigger('change');
let $theme = $('#new_inscription_form_theme');
$theme.empty();
$theme.append('<option value="">Sélectionner un thème</option>');
data.forEach(function (item) {
$theme.append(
`<option value="${item.id}">${item.nom}</option>`
);
});
} else {
$periode.hide();
}
},
error: function () {
console.error('Erreur AJAX');
}
});
} else {
$theme.hide();
$lieu.hide();
$periode.hide();
$prix.hide();
}
});
}); */
</script>
<script>
$(document).ready(function () {
const $thematique = $('#new_inscription_form_thematique');
const $theme = $('#new_inscription_form_theme');
const $lieu = $('#new_inscription_form_lieu');
const $periode = $('#new_inscription_form_periode');
const $prix = $('#new_inscription_form_prix');
const $loader = $('#loader');
$('#new_inscription_form_prix').prop('readonly', true);
$('#new_inscription_form_periode').prop('readonly', true);
$theme.parent().hide();
$lieu.parent().hide();
$periode.parent().hide();
$prix.parent().hide();
/* =========================
THÉMATIQUE → THÈMES
========================= */
$thematique.on('change', function () {
let thematiqueVal = $(this).val();
$theme.parent().hide();
$lieu.parent().hide();
$periode.parent().hide();
$prix.parent().hide();
if (!thematiqueVal) return;
$loader.show();
$.ajax({
url: "{{ path('front.inscriptions', { annee: annee }) }}",
type: "POST",
dataType: "json",
data: {
action: 'themes',
thematiqueVal: thematiqueVal
},
success: function (data) {
$theme.empty();
$theme.append('<option value="">Sélectionner un thème</option>');
data.forEach(item => {
$theme.append(
`<option value="${item.id}">${item.nom}</option>`
);
});
$theme.parent().show();
},
complete: function () {
$loader.hide();
}
});
});
/* =========================
THÉMATIQUE → THÈME → LIEUX
========================= */
$theme.on('change', function () {
let themeVal = $(this).val();
$lieu.parent().hide();
$periode.parent().hide();
$prix.parent().hide();
if (!themeVal) return;
$loader.show();
$.ajax({
url: "{{ path('front.inscriptions', { annee: annee }) }}",
type: "POST",
dataType: "json",
data: {
action: 'lieux',
themeVal: themeVal
},
success: function (data) {
$lieu.empty();
$lieu.append('<option value="">Sélectionner le lieu</option>');
data.forEach(item => {
$lieu.append(
`<option value="${item.id}">${item.lieu}</option>`
);
});
$lieu.parent().show();
},
complete: function () {
$loader.hide();
}
});
});
/* =========================
THÉMATIQUE → THÈME → LIEUX → DATE
========================= */
$lieu.on('change', function () {
let formationId = $(this).val();
$periode.parent().hide();
$prix.parent().hide();
if (!formationId) return;
$loader.show();
$.ajax({
url: "{{ path('front.inscriptions', { annee: annee }) }}",
type: "POST",
dataType: "json",
data: {
action: 'lieu_details',
formationId: formationId
},
success: function (data) {
// Session (date)
$('#new_inscription_form_periode')
.val(data.session)
.parent()
.show();
// Prix
$('#new_inscription_form_prix')
.val(data.prix + ' ' + data.devise)
.parent()
.show();
},
complete: function () {
$loader.hide();
}
});
});
});
</script>
<style id='wp-emoji-styles-inline-css' type='text/css'>
/* 🔄 Spinner */
.loader {
display: none;
width: 25px;
height: 25px;
border: 3px solid #ddd;
border-top: 3px solid #007bff;
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin-top: 10px;
}
@keyframes spin {
100% { transform: rotate(360deg); }
}
label {
font-family: arial;
font-weight: bold;
}
.form-control{
width:100%;
height:40px;
padding:10px;
border-radius:8px;
font-family: arial;
margin-bottom: 5px;
border:1px solid #ccc;
}
.textarea{
width:100%;
height:45px;
padding:10px;
font-family: arial;
border:1px solid #ccc;
height: 100px !important;
border-radius:1px !important;
}
.row {
display: flex; /* flexbox pour aligner les colonnes */
flex-wrap: wrap; /* les colonnes passent à la ligne si nécessaire */
margin-right: -0.75rem; /* -gutter/2 */
margin-left: -0.75rem; /* -gutter/2 */
}
.events_pagination ul.pagination {
display: flex;
flex-wrap: wrap;
justify-content: center;
list-style: none;
margin: 0;
padding: 0;
}
.page-item.active .page-link {
background-color: #ff6600;
color: #fff;
}
.page-link {
margin: 10px;
color: #051a53;
background-color: #ededed;
border-radius: 5px;
padding: 10px;
/* margin: 0 3px; */
}
.text-lien{
color: #ff6600;
/* font-size: 16px; */
}
/* Small devices ≥576px */
@media (min-width: 576px) {
.col-3 { flex: 0 0 100%; max-width: 100%; }
.col-sm-4 { flex: 0 0 100%; max-width: 100%; }
.col-sm-6 { flex: 0 0 100%; max-width: 100%; }
.col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}
/* Medium devices ≥768px */
@media (min-width: 768px) {
.col-md-3 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
/* Large devices ≥992px */
@media (min-width: 992px) {
.col-lg-3 { flex: 0 0 25%; max-width: 25%; }
.col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}
.type1 .date-event {
transition: all 0.5s ease;
position: absolute;
bottom: 20px;
left: 30px;
z-index: 1;
font-size: 12px;
color: #fff;
font-weight: 700;
text-transform: uppercase;
text-align: center;
line-height: 1.3;
letter-spacing: 1px;
background-color: #ff6600 !important;
padding: 12px;
}
.icon_event{
color: #ff6600 !important;
}
.wrap_header_banner .overlay-slider {
position: absolute;
top: 0;
left: 0;
padding-top: 30px;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6392156863);
}
</style>
{% endblock %}
{% block body %}
{% include 'section/navbar.html.twig' %}
<div class="wrap_header_banner" style="height: 200px; background: url({{ asset('public/inter/wp-content/uploads/2023/06/header-banner.jpg')}});">
<div class="overlay-slider">
<div class="row_site">
<div class="container_site">
<div class="cover_color"></div>
<div class="header_banner_el">
<div class="header_breadcrumbs">
<div id="breadcrumbs">
<ul class="breadcrumb">
<li><a href="{{ path('front.inter.index') }}" style="color: #fff!important;" title="accueil">Accueil</a></li>
<li class="li_separator"><span class="separator"><i class="ovaicon-next" style="color: #fff!important;"></i></span></li>
<li style="color: #fff!important;">Formations</li>
<li class="li_separator"><span class="separator"><i class="ovaicon-next" style="color: #fff!important;"></i></span></li>
<li style="color: #fff!important;">Séminaire Personnalisée</li>
</ul>
</div>
</div>
<h1 class="header_title" style="color: #fff!important;">Séminaire Personnalisée </h1>
</div>
</div>
</div>
</div>
</div>
{% for message in app.flashes('success') %}
<div class="row toast_success" style="top: 100px !important; float: right !important; position: absolute;">
<div class="col-md-2 col-sm-2" style="padding: 10px;">
<i class="fa fa-check fa-2x" aria-hidden="true"></i>
</div>
<div class="col-md-10 col-sm-10" style="padding: 10px;">
<label style="font-family: arial;">{{ message }}</label>
</div>
</div>
{% endfor %}
{% for message in app.flashes('warning') %}
<div class="row toast_warning" style="top: 100px !important; float: right !important; position: absolute;">
<div class="col-md-2 col-sm-2" style="padding: 10px;">
<i class="fa fa-check fa-2x" aria-hidden="true"></i>
</div>
<div class="col-md-10 col-sm-10" style="padding: 10px;">
<label style="font-family: arial;">{{ message }}</label>
</div>
</div>
{% endfor %}
{% for message in app.flashes('danger') %}
<div class="row toast_danger" style="top: 100px !important; float: right !important; position: absolute;">
<div class="col-md-2 col-sm-2" style="padding: 10px;">
<i class="fa fa-check fa-2x" aria-hidden="true"></i>
</div>
<div class="col-md-10 col-sm-10" style="padding: 10px;">
<label style="font-family: arial;">{{ message }}</label>
</div>
</div>
{% endfor %}
<div class="container-event">
<div id="main-event" class="content-event">
<div class="card">
{{ form_start(demandeformationsForm, {attr: {style: 'width: 100%;'} }) }}
<div>
<h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Données personnelles</h3>
</div>
<div class="row" style="padding: 20px; margin-top: 5px !important; margin-bottom: 5px !important; border: 2px solid #ededed;">
<div class="col-md-12 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.civilite) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.nom) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.prenoms) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.fonction) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.mail) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.telephone) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.whatsapp) }}
</div>
</div>
<div>
<h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Situation géographique</h3>
</div>
<div class="row" style="padding: 20px; margin-top: 5px !important; margin-bottom: 5px !important; border: 2px solid #ededed;">
<div class="col-md-4 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.pays) }}
</div>
<div class="col-md-4 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.ville) }}
</div>
<div class="col-md-4 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.adresse) }}
</div>
</div>
<div>
<h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Votre entreprise</h3>
</div>
<div class="row" style="padding: 20px; margin-top: 5px !important; margin-bottom: 5px !important; border: 2px solid #ededed;">
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.entreprise) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.siteweb) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.boitepostale) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.nbparticipant) }}
</div>
</div>
<div>
<h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Formation souhaitée</h3>
</div>
<div class="row" style="padding: 30px; margin-top: 10px !important; margin-bottom: 10px !important; border: 2px solid #ededed;">
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.thematique) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.theme) }}
</div>
<div class="col-md-6 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.lieu) }}
</div>
<div class="col-md-3 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.periode) }}
</div>
<div class="col-md-3 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.prix) }}
</div>
<div class="col-12">
<div class="loader" id="loader"></div>
</div>
</div>
<div class="row" style="padding: 30px; margin-top: 10px !important; margin-bottom: 10px !important; border: 2px solid #ededed;">
<div class="col-md-12 col-sm-12" style="padding: 5px;">
{{ form_row(demandeformationsForm.commentaire) }}
</div>
</div>
<div style="margin-left: -10px !important;" class="g-recaptcha" data-sitekey="6LfPYkosAAAAANaQq5rVy_x44wv122vknRu-sw3C"></div>
<div style="margin-left: -10px; margin-top: 10px;">
{{ form_end(demandeformationsForm) }}
</div>
</div>
</div>
</div>
{% include 'section/footer.html.twig' %}
{% block javascripts %}
<!-- Select2 JS -->
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script>
$(document).ready(function() {
// Appliquer Select2 sur le champ EntityType
//$('#new_inscription_form_thematique').select2({
//placeholder: "Sélectionner une thématique",
//allowClear: true,
//width: '100%',
//dropdownParent: $('#offcanvasRight') // ⭐ OBLIGATOIRE
//});
//$('#new_inscription_form_theme').select2({
//placeholder: "Sélectionner un thème",
//allowClear: true,
//width: '100%',
//dropdownParent: $('#offcanvasRight') // ⭐ OBLIGATOIRE
//});
});
</script>
{% endblock %}
{% endblock %}