templates/front/inscriptions/inscription-index.html.twig line 1

Open in your IDE?
  1. {% extends 'front.html.twig' %}
  2. {% block title %}Inscription | CIMEF-INTERNATIONAL{% endblock %}
  3. {% block styleSheets %}
  4. <!-- jQuery (OBLIGATOIRE avant Select2) -->
  5. <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
  6. <
  7. <script>
  8. /*    $(document).ready(function () {
  9.     let $thematique = $('#new_inscription_form_thematique');
  10.     let $theme = $('#new_inscription_form_theme');
  11.     let $lieu = $('#new_inscription_form_lieu');
  12.     let $periode = $('#new_inscription_form_periode');
  13.     let $prix = $('#new_inscription_form_prix');
  14.     $theme.hide();
  15.     $lieu.hide();
  16.     $periode.hide();
  17.     $prix.hide();
  18.     $thematique.on('change', function () {
  19.         let thematiqueVal = $(this).val();
  20.         if (thematiqueVal !== '') {
  21.             $theme.show();
  22.             $.ajax({
  23.                 url: "{{ path('front.inscriptions', { annee: annee }) }}",
  24.                 type: "POST",
  25.                 data: { thematiqueVal: thematiqueVal },
  26.                 dataType: "json",
  27.                 success: function (response) {
  28.                     if (response.thematique_id) {
  29.                         $periode.show();
  30.                         $('#new_inscription_form_periode').val(response.thematique_id).trigger('change');
  31.                     
  32.                         let $theme = $('#new_inscription_form_theme');
  33.                         $theme.empty();
  34.                         $theme.append('<option value="">Sélectionner un thème</option>');
  35.             
  36.                         data.forEach(function (item) {
  37.                             $theme.append(
  38.                                 `<option value="${item.id}">${item.nom}</option>`
  39.                             );
  40.                         });
  41.                     } else {
  42.                         $periode.hide();
  43.                     }
  44.                 },
  45.                 error: function () {
  46.                     console.error('Erreur AJAX');
  47.                 }
  48.             });
  49.         } else {
  50.             $theme.hide();
  51.             $lieu.hide();
  52.             $periode.hide();
  53.             $prix.hide();
  54.         }
  55.     });
  56. }); */
  57. </script>
  58. <script>
  59. $(document).ready(function () {
  60.     const $thematique = $('#new_inscription_form_thematique');
  61.     const $theme      = $('#new_inscription_form_theme');
  62.     const $lieu       = $('#new_inscription_form_lieu');
  63.     const $periode    = $('#new_inscription_form_periode');
  64.     const $prix       = $('#new_inscription_form_prix');
  65.     const $loader     = $('#loader');
  66.     
  67.     $('#new_inscription_form_prix').prop('readonly', true);
  68.     $('#new_inscription_form_periode').prop('readonly', true);
  69.     $theme.parent().hide();
  70.     $lieu.parent().hide();
  71.     $periode.parent().hide();
  72.     $prix.parent().hide();
  73.     /* =========================
  74.        THÉMATIQUE → THÈMES
  75.     ========================= */
  76.     $thematique.on('change', function () {
  77.         let thematiqueVal = $(this).val();
  78.         
  79.         $theme.parent().hide();
  80.         $lieu.parent().hide();
  81.         $periode.parent().hide();
  82.         $prix.parent().hide();
  83.         if (!thematiqueVal) return;
  84.         
  85.         $loader.show();
  86.         $.ajax({
  87.             url: "{{ path('front.inscriptions', { annee: annee }) }}",
  88.             type: "POST",
  89.             dataType: "json",
  90.             data: {
  91.                 action: 'themes',
  92.                 thematiqueVal: thematiqueVal
  93.             },
  94.             success: function (data) {
  95.                 $theme.empty();
  96.                 $theme.append('<option value="">Sélectionner un thème</option>');
  97.                 data.forEach(item => {
  98.                     $theme.append(
  99.                         `<option value="${item.id}">${item.nom}</option>`
  100.                     );
  101.                 });
  102.                 $theme.parent().show();
  103.             },
  104.             complete: function () {
  105.                 $loader.hide();
  106.             }
  107.         });
  108.     });
  109.     /* =========================
  110.        THÉMATIQUE → THÈME → LIEUX
  111.     ========================= */
  112.     $theme.on('change', function () {
  113.         let themeVal = $(this).val();
  114.         $lieu.parent().hide();
  115.         $periode.parent().hide();
  116.         $prix.parent().hide();
  117.         if (!themeVal) return;
  118.         
  119.         $loader.show();
  120.         $.ajax({
  121.             url: "{{ path('front.inscriptions', { annee: annee }) }}",
  122.             type: "POST",
  123.             dataType: "json",
  124.             data: {
  125.                 action: 'lieux',
  126.                 themeVal: themeVal
  127.             },
  128.             success: function (data) {
  129.                 $lieu.empty();
  130.                 $lieu.append('<option value="">Sélectionner le lieu</option>');
  131.                 data.forEach(item => {
  132.                     $lieu.append(
  133.                         `<option value="${item.id}">${item.lieu}</option>`
  134.                     );
  135.                 });
  136.                 $lieu.parent().show();
  137.             },
  138.             complete: function () {
  139.                 $loader.hide();
  140.             }
  141.         });
  142.     });
  143.     /* =========================
  144.        THÉMATIQUE → THÈME → LIEUX → DATE
  145.     ========================= */
  146.     $lieu.on('change', function () {
  147.     
  148.         let formationId = $(this).val();
  149.     
  150.         $periode.parent().hide();
  151.         $prix.parent().hide();
  152.     
  153.         if (!formationId) return;
  154.         
  155.         $loader.show();
  156.     
  157.         $.ajax({
  158.             url: "{{ path('front.inscriptions', { annee: annee }) }}",
  159.             type: "POST",
  160.             dataType: "json",
  161.             data: {
  162.                 action: 'lieu_details',
  163.                 formationId: formationId
  164.             },
  165.             success: function (data) {
  166.     
  167.                 // Session (date)
  168.                 $('#new_inscription_form_periode')
  169.                     .val(data.session)
  170.                     .parent()
  171.                     .show();
  172.     
  173.                 // Prix
  174.                 $('#new_inscription_form_prix')
  175.                     .val(data.prix + ' ' + data.devise)
  176.                     .parent()
  177.                     .show();
  178.             },
  179.             complete: function () {
  180.                 $loader.hide();
  181.             }
  182.         });
  183.     });
  184. });
  185. </script>
  186. <style id='wp-emoji-styles-inline-css' type='text/css'>
  187. .select{
  188.     padding: 10px !important;
  189.     border:1px solid red !important;
  190. }
  191. .select2{
  192.     padding: 10px;
  193.     border:1px solid red;
  194. }
  195. /* 🔄 Spinner */
  196. .loader {
  197.     display: none;
  198.     width: 25px;
  199.     height: 25px;
  200.     border: 3px solid #ddd;
  201.     border-top: 3px solid #007bff;
  202.     border-radius: 50%;
  203.     animation: spin 0.8s linear infinite;
  204.     margin-top: 10px;
  205. }
  206. @keyframes spin {
  207.     100% { transform: rotate(360deg); }
  208. }
  209. label {
  210.     font-family: arial;
  211.     font-weight: bold;
  212. }
  213. .form-control{
  214.     width:100%;
  215.     height:50px;
  216.     padding:10px;
  217.     border-radius:8px;
  218.     font-family: arial;
  219.     margin-bottom: 5px;
  220.     border:1px solid #ccc;
  221. }
  222. .textarea{
  223.     width:100%;
  224.     height:45px;
  225.     padding:10px;
  226.     font-family: arial;
  227.     border:1px solid #ccc;
  228.     height: 100px !important;
  229.     border-radius:1px !important;
  230. }
  231. .row {
  232.     display: flex;            /* flexbox pour aligner les colonnes */
  233.     flex-wrap: wrap;          /* les colonnes passent à la ligne si nécessaire */
  234.     margin-right: -0.75rem;   /* -gutter/2 */
  235.     margin-left: -0.75rem;    /* -gutter/2 */
  236. }
  237. .events_pagination ul.pagination {
  238.     display: flex;
  239.     flex-wrap: wrap;
  240.     justify-content: center;
  241.     list-style: none;
  242.     margin: 0;
  243.     padding: 0;
  244. }
  245. .page-item.active .page-link {
  246.     background-color: #ff6600;
  247.     color: #fff;
  248. }
  249. .page-link {
  250.     margin: 10px;
  251.     color: #051a53;
  252.     background-color: #ededed;
  253.     border-radius: 5px;
  254.     padding: 10px;
  255.     /* margin: 0 3px; */
  256. }
  257. .text-lien{
  258.    color: #ff6600;
  259.    /* font-size: 16px; */
  260. }
  261. /* Small devices ≥576px */
  262. @media (min-width: 576px) {
  263.   .col-3 { flex: 0 0 100%; max-width: 100%; }
  264.   .col-sm-4 { flex: 0 0 100%; max-width: 100%; }
  265.   .col-sm-6 { flex: 0 0 100%; max-width: 100%; }
  266.   .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
  267. }
  268. /* Medium devices ≥768px */
  269. @media (min-width: 768px) {
  270.   .col-md-3 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  271.   .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  272.   .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  273.   .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  274. }
  275. /* Large devices ≥992px */
  276. @media (min-width: 992px) {
  277.   .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  278.   .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  279.   .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  280.   .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  281. }
  282. .type1 .date-event {
  283.     transition: all 0.5s ease;
  284.     position: absolute;
  285.     bottom: 20px;
  286.     left: 30px;
  287.     z-index: 1;
  288.     font-size: 12px;
  289.     color: #fff;
  290.     font-weight: 700;
  291.     text-transform: uppercase;
  292.     text-align: center;
  293.     line-height: 1.3;
  294.     letter-spacing: 1px;
  295.     background-color: #ff6600 !important;
  296.     padding: 12px;
  297. }
  298. .icon_event{
  299.     color: #ff6600 !important;
  300. }
  301. .wrap_header_banner .overlay-slider {
  302.     position: absolute;
  303.     top: 0;
  304.     left: 0;
  305.     padding-top: 30px; 
  306.     width: 100%;
  307.     height: 100%;
  308.     background-color: rgba(0, 0, 0, 0.6392156863);
  309. }
  310. </style>
  311. {% endblock %}
  312. {% block body %}
  313. {% include 'section/navbar.html.twig' %}
  314. <div class="wrap_header_banner" style="height: 200px; background: url({{ asset('public/inter/wp-content/uploads/2023/06/header-banner.jpg')}});">
  315.     <div class="overlay-slider">
  316.         <div class="row_site">
  317.             <div class="container_site">
  318.                 <div class="cover_color"></div>
  319.                 <div class="header_banner_el">
  320.                     <div class="header_breadcrumbs">
  321.                         <div id="breadcrumbs">
  322.                         <ul class="breadcrumb">
  323.                             <li><a href="{{ path('front.inter.index') }}" style="color: #fff!important;" title="accueil">Accueil</a></li>
  324.                             <li class="li_separator"><span class="separator"><i class="ovaicon-next" style="color: #fff!important;"></i></span></li>
  325.                             <li style="color: #fff!important;">Formations</li>
  326.                             <li class="li_separator"><span class="separator"><i class="ovaicon-next" style="color: #fff!important;"></i></span></li>
  327.                             <li style="color: #fff!important;">Séminaires internationaux et certificats</li>
  328.                         </ul>
  329.                         </div>
  330.                     </div>
  331.                     <h1 class="header_title" style="color: #fff!important;">Séminaires internationaux et certificats</h1>
  332.                 </div>
  333.             </div>
  334.         </div>
  335.     </div>
  336. </div>
  337. {% for message in app.flashes('success') %}
  338. <div class="row toast_success" style="top: 100px !important; float: right !important; position: absolute;">
  339.     <div class="col-md-2 col-sm-2" style="padding: 10px;">
  340.         <i class="fa fa-check fa-2x" aria-hidden="true"></i>
  341.     </div>
  342.     <div class="col-md-10 col-sm-10" style="padding: 10px;">
  343.         <label style="font-family: arial;">{{ message }}</label>
  344.     </div>
  345. </div>    
  346. {% endfor %}
  347. {% for message in app.flashes('warning') %}
  348. <div class="row toast_warning" style="top: 100px !important; float: right !important; position: absolute;">
  349.     <div class="col-md-2 col-sm-2" style="padding: 10px;">
  350.         <i class="fa fa-check fa-2x" aria-hidden="true"></i>
  351.     </div>
  352.     <div class="col-md-10 col-sm-10" style="padding: 10px;">
  353.         <label style="font-family: arial;">{{ message }}</label>
  354.     </div>
  355. </div>   
  356. {% endfor %}
  357. {% for message in app.flashes('danger') %}
  358. <div class="row toast_danger" style="top: 100px !important; float: right !important; position: absolute;">
  359.     <div class="col-md-2 col-sm-2" style="padding: 10px;">
  360.         <i class="fa fa-check fa-2x" aria-hidden="true"></i>
  361.     </div>
  362.     <div class="col-md-10 col-sm-10" style="padding: 10px;">
  363.         <label style="font-family: arial;">{{ message }}</label>
  364.     </div>
  365. </div>   
  366. {% endfor %}
  367. <div class="container-event">
  368.     <div id="main-event" class="content-event">
  369.         <div>
  370.             <h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Rejoignez nos programmes de formation professionnelle</h3>
  371.         </div>
  372.         <p style="font-size: 18px;">
  373.             Merci de compléter le formulaire en sélectionnant <b>la thématique selon le thème et la ville de votre séminaire</b>, afin de bénéficier d’une prise en charge personnalisée.
  374.         </p>
  375.         
  376.         <div class="card">
  377.             {{ form_start(demandeformationsForm, {attr: {style: 'width: 100%;'} }) }}
  378.                 <div>
  379.                     <h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Formation souhaitée</h3>
  380.                 </div>
  381.                 <div class="row" style="padding: 30px; margin-top: 10px !important; margin-bottom: 10px !important; border: 2px solid #ededed;">
  382.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  383.                         {{ form_row(demandeformationsForm.thematique) }}
  384.                     </div>
  385.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  386.                         {{ form_row(demandeformationsForm.theme) }}
  387.                     </div>
  388.                     
  389.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  390.                         {{ form_row(demandeformationsForm.lieu) }}
  391.                     </div>
  392.                     <div class="col-md-3 col-sm-12" style="padding: 5px;">
  393.                         {{ form_row(demandeformationsForm.periode) }}
  394.                     </div>
  395.                     <div class="col-md-3 col-sm-12" style="padding: 5px;">
  396.                         {{ form_row(demandeformationsForm.prix) }}
  397.                     </div>
  398.                     <div class="col-12">
  399.                         <div class="loader" id="loader"></div>
  400.                     </div>
  401.                 </div>
  402.                 <div>
  403.                     <h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Données personnelles</h3>
  404.                 </div>
  405.                 <div class="row" style="padding: 20px; margin-top: 5px !important; margin-bottom: 5px !important; border: 2px solid #ededed;">
  406.                     <div class="col-md-12 col-sm-12" style="padding: 5px;">
  407.                         {{ form_row(demandeformationsForm.civilite) }}
  408.                     </div>
  409.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  410.                         {{ form_row(demandeformationsForm.nom) }}
  411.                     </div>
  412.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  413.                         {{ form_row(demandeformationsForm.prenoms) }}
  414.                     </div>
  415.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  416.                         {{ form_row(demandeformationsForm.fonction) }}
  417.                     </div>
  418.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  419.                         {{ form_row(demandeformationsForm.mail) }}
  420.                     </div>
  421.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  422.                         {{ form_row(demandeformationsForm.telephone) }}
  423.                     </div>
  424.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  425.                         {{ form_row(demandeformationsForm.whatsapp) }}
  426.                     </div>  
  427.                 </div>
  428.                 <div>
  429.                     <h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Situation géographique</h3>
  430.                 </div>
  431.                 <div class="row" style="padding: 20px; margin-top: 5px !important; margin-bottom: 5px !important; border: 2px solid #ededed;">
  432.                     <div class="col-md-4 col-sm-12" style="padding: 5px;">
  433.                         {{ form_row(demandeformationsForm.pays) }}
  434.                     </div>
  435.                     <div class="col-md-4 col-sm-12" style="padding: 5px;">
  436.                         {{ form_row(demandeformationsForm.ville) }}
  437.                     </div>
  438.                     <div class="col-md-4 col-sm-12" style="padding: 5px;">
  439.                         {{ form_row(demandeformationsForm.adresse) }}
  440.                     </div>
  441.                 </div>
  442.                 <div>
  443.                     <h3 class="header_title" style="font-weight: bolder; color: #051a53; font-family: arial;">Votre entreprise</h3>
  444.                 </div>
  445.                 <div class="row" style="padding: 20px; margin-top: 5px !important; margin-bottom: 5px !important; border: 2px solid #ededed;">
  446.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  447.                         {{ form_row(demandeformationsForm.entreprise) }}
  448.                     </div>
  449.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  450.                         {{ form_row(demandeformationsForm.siteweb) }}
  451.                     </div>
  452.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  453.                         {{ form_row(demandeformationsForm.boitepostale) }}
  454.                     </div>
  455.                     <div class="col-md-6 col-sm-12" style="padding: 5px;">
  456.                         {{ form_row(demandeformationsForm.nbparticipant) }}
  457.                     </div> 
  458.                 </div>
  459.                 <div class="row" style="padding: 30px; margin-top: 10px !important; margin-bottom: 10px !important; border: 2px solid #ededed;">
  460.                     <div class="col-md-12 col-sm-12" style="padding: 5px;">
  461.                         {{ form_row(demandeformationsForm.commentaire) }}
  462.                     </div>
  463.                 </div>  
  464.                 <div style="margin-left: -10px !important;" class="g-recaptcha" data-sitekey="6LfPYkosAAAAANaQq5rVy_x44wv122vknRu-sw3C"></div>
  465.                 <div style="margin-left: -10px; margin-top: 10px;">
  466.                     {{ form_end(demandeformationsForm) }}
  467.                 </div> 
  468.         </div>
  469.         
  470.     </div>
  471. </div>
  472. {% include 'section/footer.html.twig' %}
  473. {% block javascripts %}
  474.     <!-- Select2 JS -->
  475.     <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
  476.     
  477.     <script>
  478.         $(document).ready(function() {
  479.             // Appliquer Select2 sur le champ EntityType
  480.             //$('#new_inscription_form_thematique').select2({
  481.                 //placeholder: "Sélectionner une thématique",
  482.                 //allowClear: true,
  483.                 //width: '100%',
  484.                 //dropdownParent: $('#offcanvasRight') // ⭐ OBLIGATOIRE
  485.             //});
  486.             //$('#new_inscription_form_theme').select2({
  487.                 //placeholder: "Sélectionner un thème",
  488.                 //allowClear: true,
  489.                 //width: '100%',
  490.                 //dropdownParent: $('#offcanvasRight') // ⭐ OBLIGATOIRE
  491.             //});
  492.         });
  493.     </script>
  494. {% endblock %}
  495. {% endblock %}