templates/stagiaires/ajouter.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block content %}
  3.     <h5 class="text-uppercase fw-bold">
  4.         <a href="{{ path('stagiaires') }}"><button type="button" class="btn btn-secondary text-uppercase" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Retour"><i class="bi bi-arrow-bar-left"></i> Stagiaires</button></a> 
  5.         <i class="bi bi-caret-right"></i> Ajouter
  6.     </h5>
  7.     <div class="row">
  8.         <div class="col-8 mt-3">
  9.             {{ form_start(formulaire) }}
  10.                 <div class="row">
  11.                     <div class="col-6">{{ form_row(formulaire.agence) }}</div>
  12.                 </div>
  13.                 <div class="row">
  14.                     <div class="col-6">{{ form_row(formulaire.etat) }}</div>
  15.                 </div>
  16.                 <div class="row">
  17.                     <div class="col-6">
  18.                         {{ form_row(formulaire.nom) }}
  19.                     </div>
  20.                     <div class="col-6">{{ form_row(formulaire.prenom) }}</div>
  21.                     <div id="stagiaireVerifDoublonMessage"></div>
  22.                 </div>
  23.                 <div class="row">
  24.                     <div class="col-3">
  25.                         {{ form_label(formulaire.telephone) }}
  26.                         <div class="input-group mb-3">
  27.                             {{ form_widget(formulaire.telephone) }}
  28.                             <span class="input-group-text" id="basic-addon"><i class="bi bi-phone-vibrate"></i></span>
  29.                         </div>
  30.                     </div>
  31.                     <div class="col-3">
  32.                         {{ form_label(formulaire.agrementNum) }}
  33.                         <div class="input-group mb-3">
  34.                             {{ form_widget(formulaire.agrementNum) }}
  35.                             <span class="input-group-text" id="basic-addon"><i class="bi bi-123"></i></span>
  36.                         </div>
  37.                     </div>
  38.                     <div class="col-3">
  39.                         {{ form_label(formulaire.agrementDateFin) }}
  40.                         <div class="input-group mb-3">
  41.                             {{ form_widget(formulaire.agrementDateFin) }}
  42.                         </div>
  43.                     </div>
  44.                     <div class="col-3 align-self-center">
  45.                         <div class="form-check form-switch input-group mb-2">
  46.                             {{ form_widget(formulaire.accueil240h) }}
  47.                         </div>
  48.                     </div>
  49.                 </div>
  50.                 {{ form_label(formulaire.email) }}
  51.                 <div class="input-group mb-3">
  52.                     {{ form_widget(formulaire.email) }}
  53.                     <span class="input-group-text" id="basic-addon">@</span>
  54.                 </div>
  55.                 
  56.                 {{ form_row(formulaire.adresse1) }}
  57.                 {{ form_row(formulaire.adresse2) }}
  58.                 <div class="row">
  59.                     <div class="col-2">
  60.                         {{ form_label(formulaire.codePostal) }}
  61.                         <div class="input-group mb-3">
  62.                             {{ form_widget(formulaire.codePostal) }}
  63.                             <!-- <span class="input-group-text" id="basic-addon"><i class="bi bi-phone-vibrate"></i></span> -->
  64.                         </div>
  65.                     </div>
  66.                     <div class="col-4">
  67.                         {{ form_label(formulaire.ville) }}
  68.                         <div class="input-group mb-3">
  69.                             {{ form_widget(formulaire.ville) }}
  70.                             <span class="input-group-text" id="basic-addon"><i class="bi bi-geo-fill"></i></span>
  71.                         </div>
  72.                     </div>
  73.                 </div>
  74.                 <div class="row">
  75.                     <div class="col-4">
  76.                         {{ form_label(formulaire.diplome1) }}
  77.                         <div class="input-group mb-3">
  78.                             {{ form_widget(formulaire.diplome1) }}
  79.                             <span class="input-group-text" id="basic-addon"><i class="bi bi-briefcase"></i></span>
  80.                         </div>
  81.                     </div>
  82.                     <div class="col-4">
  83.                         {{ form_label(formulaire.diplome2) }}
  84.                         <div class="input-group mb-3">
  85.                             {{ form_widget(formulaire.diplome2) }}
  86.                             <span class="input-group-text" id="basic-addon"><i class="bi bi-briefcase"></i></span>
  87.                         </div>
  88.                     </div>
  89.                     <div class="col-4">
  90.                         {{ form_label(formulaire.diplome3) }}
  91.                         <div class="input-group mb-3">
  92.                             {{ form_widget(formulaire.diplome3) }}
  93.                             <span class="input-group-text" id="basic-addon"><i class="bi bi-briefcase"></i></span>
  94.                         </div>
  95.                     </div>
  96.                 </div>
  97.                     
  98.                 <div class="row mb-3">
  99.                     <div class="col-12">Dispenses :</div>
  100.                 </div>
  101.                 <div class="row form-check form-switch">
  102.                     <div class="col-4">
  103.                         <div class="input-group mb-2">
  104.                             {{ form_widget(formulaire.dispenseDomaine1) }}
  105.                         </div>
  106.                     </div>
  107.                     <div class="col-4">
  108.                         <div class="input-group mb-2">
  109.                             {{ form_widget(formulaire.dispenseDomaine2) }}
  110.                         </div>
  111.                     </div>
  112.                     <div class="col-4">
  113.                         <div class="input-group mb-2">
  114.                             {{ form_widget(formulaire.dispenseDomaine3) }}
  115.                         </div>
  116.                     </div>
  117.                 </div>
  118.             {{ form_end(formulaire) }}
  119.         </div>
  120.         <div class="col-4">
  121.             <h5><i class="bi bi-info-circle"></i> Aide à la saisie</h5>
  122.             <div class="border-start ps-2">
  123.                 Les champs avec un fond anthracite sont obligatoires.
  124.             </div>
  125.         </div>
  126.     </div>
  127.     <script>
  128.         $('#stagiaires_add_form_nom, #stagiaires_add_form_prenom').change(function(){
  129.             // alert('toto');
  130.             valeurStagiaireNom = $('#stagiaires_add_form_nom').val();
  131.             valeurStagiairePrenom = $('#stagiaires_add_form_prenom').val();
  132.             // alert(valeurStagiaireNom+' '+valeurStagiairePrenom);
  133.             $.ajax({
  134.                 method: "POST",
  135.                 url: "{{ path('stagiaires_add_verif_doublon') }}",
  136.                 data: { 
  137.                     stagiaireNom: valeurStagiaireNom,
  138.                     stagiairePrenom: valeurStagiairePrenom
  139.                 }
  140.             })
  141.             .done(function( msg ) {
  142.                 $('#stagiaireVerifDoublonMessage').html(msg);
  143.                 if(msg != '') {
  144.                     $('#stagiaires_add_form_submit').prop("disabled",true);
  145.                 }
  146.                 else {
  147.                     $('#stagiaires_add_form_submit').prop("disabled",false);
  148.                 }
  149.             });
  150.         });
  151.         
  152.     </script>
  153. {% endblock %}