templates/inscription_site/inscription.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4.   <meta charset="utf-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1">
  6.   <title>Inscription</title>
  7.   <link rel="shortcut icon" href="{{asset('adminn/img/fav.ico')}}">
  8.   <!-- Google Font: Source Sans Pro -->
  9.   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  10.   <!-- Font Awesome -->
  11.   <link rel="stylesheet" href="{{asset('adminn/plugins/fontawesome-free/css/all.min.css')}}">
  12.   <!-- Ionicons -->
  13.   <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  14.   <!-- Tempusdominus Bootstrap 4 -->
  15.   <link rel="stylesheet" href="{{asset('adminn/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css')}}">
  16.   <!-- iCheck -->
  17.   <link rel="stylesheet" href="{{asset('adminn/plugins/icheck-bootstrap/icheck-bootstrap.min.css')}}">
  18.   <!-- JQVMap -->
  19.   <link rel="stylesheet" href="{{asset('adminn/plugins/jqvmap/jqvmap.min.css')}}">
  20.   <!-- Theme style -->
  21.   <link rel="stylesheet" href="{{asset('adminn/dist/css/adminlte.min.css')}}">
  22.   <!-- overlayScrollbars -->
  23.   <link rel="stylesheet" href="{{asset('adminn/plugins/overlayScrollbars/css/OverlayScrollbars.min.css')}}">
  24.   <!-- Daterange picker -->
  25.   <link rel="stylesheet" href="{{asset('adminn/plugins/daterangepicker/daterangepicker.css')}}">
  26.  <!-- Select2 -->
  27.   <link rel="stylesheet" href="{{asset('adminn/plugins/select2/css/select2.min.css')}}">
  28.   <link rel="stylesheet" href="{{asset('adminn/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css')}}">
  29.   <!-- stpper-->
  30.   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bs-stepper/dist/css/bs-stepper.min.css">
  31.     <!-- Toastr -->
  32.   <link rel="stylesheet" href="{{asset('adminn/plugins/toastr/toastr.min.css')}}">
  33.   {#<link rel="stylesheet" href="{{asset('/admin/loader.css')}}">#}
  34.   <!-- SimEditor -->
  35.   <link href="{{asset('simditor/site/assets/styles/simditor.css')}}" rel="stylesheet" type="text/css" /> 
  36.   <style>
  37.   .thead-theme {
  38.         background-color: #f39c12;
  39.         color: white;
  40.     }
  41.   thead {
  42.     background-color: #f39c12 !important;
  43.         color: white !important;
  44.   }
  45.     .btn-primary{
  46.         background-color: #f39c12 !important;
  47.         border-color: #f39c12 !important;
  48.         color: white !important;
  49.     }
  50.     .btn-primary:hover{
  51.         background-color: #f39a00 !important;
  52.         border-color: #f3fa00 !important;
  53.         color: white !important;
  54.     }
  55.     .btn-brown {
  56.         background-color: #f39c12;
  57.         color: white;
  58.         border-radius: 0px;
  59.         border: none;
  60.     }
  61.     .btn-brown:hover {
  62.         color: #111;
  63.     }
  64.   </style>
  65. </head>
  66. <body class="hold-transition layout-fixed">
  67.     <!-- Content Wrapper. Contains page content -->
  68. <div class="">
  69.     <!-- Content Header (Page header) -->
  70.     <div class="content-header">
  71.         <div class="container-fluid">
  72.             {# include ("titre.html.twig",{'titre':'Inscription',"class":"fas fa-bars","path":"app_inscrit_index",'button':'Liste','page':page,'menu':menu})  #}
  73.             <div class="card">
  74.                 <div class="card-header text-white thead-theme">
  75.                     <h3 class="card-title">Nouvelle inscription</h3>
  76.                 </div>
  77.                 <div class="card-body">
  78.                 
  79.                     <!-- start stepper-->
  80.                     <div class="bs-stepper">
  81.                     <div class="bs-stepper-header" role="tablist">
  82.                         <!-- your steps here -->
  83.                         <div class="step" data-target="#information-part">
  84.                             <button type="button" class="step-trigger" role="tab" aria-controls="information-part" id="information-part-trigger">
  85.                                 <span class="bs-stepper-circle">1</span>
  86.                                 <span class="bs-stepper-label">Formation</span>
  87.                             </button>
  88.                         </div>
  89.                         <div class="line"></div>
  90.                        
  91.                        
  92.                         
  93.                         
  94.                         <div class="step" data-target="#validation-part">
  95.                         <button type="button" class="step-trigger" role="tab" aria-controls="information-part" id="information-part-trigger">
  96.                             <span class="bs-stepper-circle">2</span>
  97.                             <span class="bs-stepper-label">Validation</span>
  98.                         </button>
  99.                         </div>
  100.                     </div>
  101.                     <div class="bs-stepper-content">
  102.                         <!-- your steps content here -->
  103.                         <form method="post" id="forminscrit" action="{{path('app_inscrit_site_new', {'site':carte.id})}}" enctype="multipart/form-data">
  104.                         
  105.                         
  106.                         <div id="information-part" class="content" role="tabpanel" aria-labelledby="information-part-trigger">
  107.                             <div class="row">
  108.                                 <div class="col-md-3">
  109.                                     <label>Type inscription</label>
  110.                                     <select class="form-control" name="typeIns" id="typeInscrit">
  111.                                         <option value="" disabled>Sélectionner</option>
  112.                                         <option value="2">Particulier</option>
  113.                                         {% if carte.duree == null or carte.thinkificFormationId == null %}
  114.                                         <option value="4">CPF</option>
  115.                                         {% endif %}
  116.                                     </select>
  117.                                 </div>
  118.                             </div>
  119.                             <hr>
  120.                             <div class="row">
  121.                                 {#<div class="col-md-3">#}
  122.                                     {#<label>Formation</label>#}
  123.                                     
  124.                                     {% for item in formations %}
  125.                                         <label class="mt-2">
  126.                                             {# if item.getTypeformation() == 3 %}
  127.                                                 
  128.                                             {% elseif item.getTypeformation() == 1 %}
  129.                                                 
  130.                                             {% elseif item.getTypeformation() == 2 %}
  131.                                                 
  132.                                             {% elseif item.getTypeformation() == 4 %}
  133.                                                 
  134.                                             {% endif #}
  135.                                         </label>
  136.                                        {# <input class="form-control " name="formationshow" id="formationshow" value="{{item.wording}}">#}
  137.                                         <input type="hidden" class="form-control" name="formation[]"  value="{{item.getId()}}">
  138.                                     {% endfor %}
  139.                                     </select>
  140.                                 {#</div>#}
  141.                                 <div class="col-md-3">
  142.                                     
  143.                                     {% for item in session %}
  144.                                         
  145.                                         {% if item[0].startdate is defined %}    
  146.                                         <label>Séléctionnez la session de {{item[0].formation.wording}}</label>
  147.                                             <select class="form-control session mt-2" name="session[]" id="session">
  148.                                                     {% for itemsession in item %}
  149.                                                         <option value="{{itemsession.id}}">{{itemsession.getStartDate() | date('d/m/Y') ~' '~itemsession.getEndDate() | date('d/m/Y')}}</option>
  150.                                                     {% endfor %}
  151.                                                     
  152.                                                 
  153.                                             </select>
  154.                                             
  155.                                         {% elseif item[0].lieu is defined%}
  156.                                             <label>Sélectionnez votre date d'examen</label>
  157.                                             <select class="form-control mt-1 " name="examen" id="dateexamen">
  158.                                                 {# if demandeSessionDate is not empty %}
  159.                                                     <option value="{{demandeSession}}" selected>{{demandeSessionDate}}</option>
  160.                                                 {% else #}
  161.                                                     {% for itemsession in item %}
  162.                                                         <option value="{{itemsession.id}}">{{itemsession.dateexamen() | date('d/m/Y') }}</option>
  163.                                                     {% endfor %}
  164.                                                     
  165.                                                 
  166.                                             </select>
  167.                                         {% elseif item[0] is defined and item[0] == "elearning" %}
  168.                                             <label>Définissez votre période de E-learning</label>
  169.                                             <div class="d-flex mt-2">
  170.                                                 Du <input type="date" 
  171.                                                         id="datedebut" 
  172.                                                         {% if carte.duree != null and carte.thinkificFormationId != null %} 
  173.                                                             value="{{ datedebutelearning|date('Y-m-d') }}" 
  174.                                                             class="form-control mx-2 disabled" 
  175.                                                             readonly 
  176.                                                         {% else %}
  177.                                                             class="form-control mx-2" 
  178.                                                         {% endif %} 
  179.                                                         name="datedebut">
  180.                                                 au 
  181.                                                 <input type="date" 
  182.                                                     id="datefin" 
  183.                                                     {% if carte.duree != null and carte.thinkificFormationId != null %} 
  184.                                                         value="{{ datefinelearning|date('Y-m-d') }}" 
  185.                                                     {% endif %} class="form-control ml-2 disabled" readonly name="datefin" style="z-index: 10000000;"> 
  186.                                             </div>
  187.                                         {% elseif item[0] is defined and item[0] == "conduite" %}
  188.                                             <label>Vous avez {{conduitehoure}}H de conduite </label>
  189.                                             <input type="number" class="form-control mt-2" id="conduite" readonly value="{{ conduitehoure }}" required min="1" name="conduite">
  190.                                         {% endif %}
  191.                                         
  192.                                             
  193.                                     {#<input type="hidden" class="form-control" name="session[]"  value="">#}
  194.                                     {% endfor %}
  195.                                      
  196.                                 </div>
  197.                                 {#<div class="col-md-3">
  198.                                     <label>Statut</label><br>
  199.                                     <span id="statut" class="mt-5" style="font-size:20px"></span>
  200.                                 </div>#}
  201.                                 <hr>
  202.                             </div>
  203.                             
  204.                             <button class="btn next mt-2 text-white thead-theme" >Suivant</button>
  205.                         </div>
  206.                         
  207.                          <!-- validation -->
  208.                         <div id="validation-part" class="content" role="tabpanel" aria-labelledby="piece-part-trigger">
  209.                            
  210.                              <div class="row">
  211.                                 <div class="col-md-4">
  212.                                     <label>Nom <span class="red-star" style="font-size:10px;color:red;">★</span></label>
  213.                                     <input type="text" required name="lastname" id="lastname" class='form-control'>
  214.                                 </div>
  215.                                 <div class="col-md-4">
  216.                                     <label>Prénom <span class="red-star" style="font-size:10px;color:red;">★</span></label>
  217.                                     <input type="text" required name="firstname" id="firstname" class='form-control'>
  218.                                 </div>
  219.                                 <div class="col-md-4">
  220.                                     <label>Civilité <span class="red-star" style="font-size:10px;color:red;">★</span></label>
  221.                                     <select required name="civilite" class='form-control form-select'>
  222.                                         <option value="g" selected>Monsieur</option>
  223.                                         <option value="f">Madame</option>
  224.                                     </select>
  225.                                 </div>
  226.                                 <div class="col-md-4">
  227.                                     <label>Téléphone </label>
  228.                                     <input type="text" required name="telephone" id="telephone" class='form-control' >
  229.                                 </div>
  230.                                 <div class="col-md-4">
  231.                                     <label>Email <span class="red-star" style="font-size:10px;color:red;"></span></label>
  232.                                     <input type="email" required name="email" id="email" class='form-control'>
  233.                                 </div>
  234.                                 <input type="hidden" name="paeiement" id="paeiement">
  235.                                
  236.                             </div>
  237.                             
  238.     
  239.                             <button class="btn previous mt-2 text-white thead-theme" >Précédent</button>
  240.                             <button class="btn btn-success mt-2" id="submitPaiement" >Terminer et payer</button>
  241.                             <button class="btn btn-success mt-2" id="submitWithoutPaiement">Terminer et payer en agence</button>
  242.                         </div>
  243.                     </div>
  244.                     </div> <!--end stepper-->
  245.                     </form>
  246.                 </div>
  247.             </div>
  248.         </div>
  249.     </div>
  250. </div>
  251. <!-- modal tier -->
  252.   
  253. </div>
  254.     <footer class="main-footer">
  255.     
  256.     <strong>Copyright &copy; <script>
  257.                         document.write(new Date().getFullYear())
  258.                     </script> </strong>
  259.     Tout droit réserver.
  260.     <!-- jQuery -->
  261. <script src="{{asset('adminn/plugins/jquery/jquery.min.js')}}"></script>
  262. <!-- jQuery UI 1.11.4 -->
  263. <script src="{{asset('adminn/plugins/jquery-ui/jquery-ui.min.js')}}"></script>
  264.   <!-- Required datatable js -->
  265.   <script src="{{asset('adminn/plugins/datatables/jquery.dataTables.min.js')}}"></script>
  266. <script>
  267.   $.widget.bridge('uibutton', $.ui.button)
  268. </script>
  269. <!-- Bootstrap 4 -->
  270. <script src="{{asset('adminn/plugins/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
  271. <!-- daterangepicker -->
  272. <script src="{{asset('adminn/plugins/moment/moment.min.js')}}"></script>
  273. <script src="{{asset('adminn/plugins/daterangepicker/daterangepicker.js')}}"></script>
  274. <!-- Tempusdominus Bootstrap 4 -->
  275. <script src="{{asset('adminn/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js')}}"></script>
  276. <!-- Summernote -->
  277. <script src="{{asset('adminn/plugins/summernote/summernote-bs4.min.js')}}"></script>
  278. <!-- overlayScrollbars -->
  279. <script src="{{asset('adminn/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js')}}"></script>
  280. <!-- AdminLTE App -->
  281. <script src="{{asset('adminn/dist/js/adminlte.js')}}"></script>
  282. <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
  283. <!-- Select2 -->
  284. <script src="{{asset('adminn/plugins/select2/js/select2.full.min.js')}}"></script>
  285. <!--setpper-->
  286. <script src="https://cdn.jsdelivr.net/npm/bs-stepper/dist/js/bs-stepper.min.js"></script>
  287. <script src="{{asset('adminn/dist/js/pages/dashboard.js')}}"></script>
  288. <!-- Toastr -->
  289. <script src="{{asset('adminn/plugins/toastr/toastr.min.js')}}"></script>
  290. <script>
  291. let sourceAuto = 1, sourceExt = 0;
  292. let montant = 0; //montant a utiliser dans les calculs
  293. let montantcompany = {{ carte.pricecompany }}, montantpersonal = {{ carte.pricepersonal }}; montantcpf = {{ carte.pricecpf }}, montantcollectivite = {{ carte.pricecollectivite == null ? 0 : carte.pricecollectivite }}, montantexamen = 0; //montant selon la source de financement pour appliquer la remise
  294. $(document).ready(function(){
  295.     $("#submitPaiement").on("click",function (params) {
  296.         params.preventDefault();
  297.         $("#paeiement").val(1);
  298.         if(validateForm())
  299.         document.getElementById("forminscrit").submit();
  300.     });
  301.     $("#submitWithoutPaiement").on("click",function (params) {
  302.         params.preventDefault();
  303.         $("#paeiement").val(2);
  304.         if(validateForm())
  305.         document.getElementById("forminscrit").submit();
  306.     });
  307. });
  308. $("#typeInscrit").on("change",function(params){
  309.     if($("#typeInscrit").val() == "4"){
  310.         $("#submitPaiement").hide();
  311.     }
  312.     else
  313.         $("#submitPaiement").show();
  314. });
  315. /*$(document).ready(function () {
  316.   var stepper = new Stepper($('.bs-stepper')[0])
  317. })*/
  318. var stepper = new Stepper(document.querySelector('.bs-stepper'))
  319.     $('#forminscrit').on('submit', function(){
  320.         $('#loader').removeClass('d-none');
  321.     });
  322. $('#telephone').on('keypress',function (evt) {
  323.      var ASCIICode = (evt.which) ? evt.which : evt.keyCode
  324.                       if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57))
  325.                           return false;
  326.                       return true;
  327.   })
  328.   $('#conduite').on('keypress',function (evt) {
  329.      var ASCIICode = (evt.which) ? evt.which : evt.keyCode
  330.                       if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57))
  331.                           return false;
  332.                       return true;
  333.   })
  334.  
  335. //initalization selct2
  336. function demandeInfo(){
  337. }
  338. function validateForm() {
  339.     let x = $("#lastname").val();
  340.     if (x == "") {
  341.         $("#lastname").addClass("is-invalid");
  342.         return false;
  343.     }
  344.      x = $("#firstname").val();
  345.     if (x == "") {
  346.         $("#firstname").addClass("is-invalid");
  347.         return false;
  348.     }
  349.      x = $("#telephone").val();
  350.     if (x == "") {
  351.         $("#telephone").addClass("is-invalid");
  352.         return false;
  353.     }
  354.      x = $("#email").val();
  355.     if (x == "") {
  356.         $("#email").addClass("is-invalid");
  357.         return false;
  358.     }
  359.     return true;
  360. $(function () {
  361.     //Initialize Select2 Elements
  362.     $('.select2').select2()
  363.    });
  364.    
  365.    //demandeInfo();
  366.    //getSession(); // recupere les sessions
  367.    
  368.   $(document).ready(function () {
  369.     $('#montantTotal').on('change', function(){
  370.         checkFormationAmount();
  371.         if(parseFloat($('#montantTotal').val()) < 1.00){
  372.             toastr.error("Le montant de la formation ne peut être égal à 0 €");
  373.         }
  374.     });
  375.     $('.iconCheck').on('click',function(params) {
  376.       $('#datatable').find('input[name="check"]').each(function(){
  377.         if($(this).is(":checked"))
  378.         $(this).prop( "checked", false )
  379.         else
  380.         $(this).prop( "checked", true )
  381.       })
  382.     });
  383.     
  384.     $('.next').on('click',function (params) {        
  385.         /*if(stepper._currentIndex == 0 && $('#tier').val() == '')
  386.         {
  387.             $('#queryTier').addClass('is-invalid');
  388.             return false;
  389.         }
  390.         $('#queryTier').removeClass('is-invalid');*/
  391.         
  392.         if(stepper._currentIndex == 0 )
  393.         {
  394.             $('.session').each(function (index, element) {
  395.                 if($(this).val() == null || $(this).val() == ''){
  396.                     $(this).addClass('is-invalid');
  397.                     return false;
  398.                 }
  399.                 else
  400.                     $(this).removeClass('is-invalid');
  401.             });
  402.             $('.session').removeClass('is-invalid');
  403.             if($('#dateexamen').val()!= undefined && $('#dateexamen').val() == ''){
  404.                 $('#dateexamen').addClass('is-invalid');
  405.                 return false;
  406.             }
  407.             else
  408.                 $('#dateexamen').removeClass('is-invalid');
  409.             if($('#conduite').val()!= undefined && $('#conduite').val() == ''){
  410.                 $('#conduite').addClass('is-invalid');
  411.                 return false;
  412.             }
  413.             $('#conduite').removeClass('is-invalid');
  414.             //choix de la date elearning
  415.             if($('#datedebut').val()!= undefined && $('#datedebut').val() == ''){
  416.                 $('#datedebut').addClass('is-invalid');
  417.                 $('#datefin').addClass('is-invalid');
  418.                 return false;
  419.             }
  420.             else{
  421.                 $('#datedebut').removeClass('is-invalid');
  422.                 $('#datefin').removeClass('is-invalid');
  423.             }
  424.         }
  425.        
  426.       
  427.         
  428.         stepper.next();
  429.         params.preventDefault();
  430.     });
  431.     $('.previous').on('click',function (params) {
  432.         stepper.previous();
  433.         params.preventDefault();
  434.     });
  435.     //controle date de debut elearning
  436.     $('#datedebut').on('change', function(){
  437.         if($('#datedebut').val() == ''){
  438.             $('#datefin').val('');
  439.             return;
  440.         }
  441.         let debut = new Date($('#datedebut').val());
  442.         let fin;
  443.         Date.isLeapYear = function (year) { 
  444.             return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); 
  445.         };
  446.         Date.getDaysInMonth = function (year, month) {
  447.             return [31, (Date.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
  448.         };
  449.         Date.prototype.isLeapYear = function () { 
  450.             return Date.isLeapYear(this.getFullYear()); 
  451.         };
  452.         Date.prototype.getDaysInMonth = function () { 
  453.             return Date.getDaysInMonth(this.getFullYear(), this.getMonth());
  454.         };
  455.         Date.prototype.addMonths = function (value) {
  456.             var n = this.getDate();
  457.             this.setDate(1);
  458.             this.setMonth(this.getMonth() + value);
  459.             this.setDate(Math.min(n, this.getDaysInMonth()));
  460.             return this;
  461.         };
  462.         fin = debut.addMonths(2);
  463.         $('#datefin').val(fin.toLocaleString("fr-CA", { year: "numeric" }) + "-" + fin.toLocaleString("fr-CA", { month: "2-digit" }) + "-" + fin.toLocaleString("fr-CA", { day: "2-digit" }));
  464.     });
  465.     
  466.   });
  467.   
  468.   
  469.     function parse(str) {
  470.     var args = [].slice.call(arguments, 1),
  471.         i = 0;
  472.     return str.replace(/'/g,'&quot;');
  473. }
  474.   
  475.   
  476. </script>
  477. <script>
  478.  
  479.     {% for message in app.flashes('messageerror') %}
  480.           toastr.error('{{ message }}');
  481.         {% endfor %}
  482.         {% for message in app.flashes('message') %}
  483.           toastr.error('{{ message }}');
  484.           console.log("dfdfd");
  485.         {% endfor %}
  486.     $("#optioncategorieinscrit").hide(); 
  487.      $(function () {
  488.     //Initialize Select2 Elements
  489.     $('.select2bs4').select2({
  490.       theme: 'bootstrap4'
  491.     })});
  492.    
  493.     </script>
  494.     
  495. </body>
  496. </html>