templates/questionnaire/afficher.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Questionnaire{% endblock %}
  3. {% block stylesheets %}
  4.     <link href="{{ asset('plugins/barrating/themes/bars-movie.css') }}" rel="stylesheet"/>
  5.     <style>
  6.         .newQuestion {
  7.             margin: 0 2%;
  8.         }
  9.         .btn {
  10.             margin : 1% 0;
  11.         }
  12.         .div-table {
  13.             overflow-x: auto;
  14.         }
  15.         input[type="radio"][disabled] {
  16.             color: red;
  17.         }
  18.         .divRes {
  19.             border: 1px solid black;
  20.             border-radius: 5px;
  21.             background-color: darkgreen;
  22.             margin: 2%;
  23.         }
  24.         @media all and (max-width: 450px){
  25.             .rowquestions {
  26.                 width: 100%;
  27.                 padding-left: 15px;
  28.             }
  29.             .divnote{
  30.                 padding-top: 0!important;
  31.             }
  32.         }
  33.         .divnote{
  34.             padding-top: 50px;
  35.         }
  36.         span.required {
  37.             color: red;
  38.         }
  39.         label.error{
  40.             color:red;
  41.             font-weight: bold;
  42.         }
  43.         input.error {
  44.             border-color : red;
  45.         }
  46.         .etoile {
  47.             color:red;
  48.         }
  49.         .progress-bar {
  50.             color: black;
  51.         }
  52.         .table {
  53.             width: 100%;
  54.             margin-bottom: 1rem;
  55.             border: 1px solid black;
  56.         }
  57.         .table thead th {
  58.             vertical-align: bottom;
  59.             border-bottom: 1px solid black;
  60.         }
  61.         .table td, .table th {
  62.             padding: .75rem;
  63.             vertical-align: top;
  64.             border-top: 1px solid black;
  65.         }
  66.         tr {
  67.             text-align: center;
  68.         }
  69.     </style>
  70. {% endblock %}
  71. {% block navBar %}{{ questionnaire.titre }}{% endblock %}
  72. {% block body %}
  73.     <div class="col-xl-12 col-md-12">
  74.         <div class="row mb-4">
  75.             <div class="col-xl-10 offset-xl-1 col-md-10 offset-md-1">
  76.                 <div class="card">
  77.                     <form action="{{ path('afficher_questionnaire') }}" method="post" name="question">
  78.                         <div class="card-header">
  79.                             <div class="row">
  80.                                 <ul class="nav nav-pills" id="pills-tab" role="tablist">
  81.                                     {% for cat in categories %}
  82.                                         <li class="nav-item">
  83.                                             <a class="nav-link {% if loop.first and resultat == false %}active{% endif %}" id="pills-{{ cat.classe }}-tab" data-toggle="pill" href="#pills-{{ cat.classe }}"
  84.                                                role="tab"
  85.                                                aria-controls="pills-{{ cat.classe }}" aria-selected="false">{{ cat.libelle }}</a>
  86.                                         </li>
  87.                                     {% endfor %}
  88.                                     {% if resultat == true %}
  89.                                         <li class="nav-item">
  90.                                             <a class="nav-link active" id="pills-res-tab" data-toggle="pill" href="#pills-res"
  91.                                                role="tab"
  92.                                                aria-controls="pills-res" aria-selected="false">Résultat</a>
  93.                                         </li>
  94.                                         <li class="nav-item">
  95.                                             <a class="nav-link " id="pills-exploitation-tab" data-toggle="pill" href="#pills-exploitation"
  96.                                                role="tab"
  97.                                                aria-controls="pills-exploitation" aria-selected="false">Exploitation</a>
  98.                                         </li>
  99.                                     {% endif %}
  100.                                 </ul>
  101.                             </div>
  102.                         </div>
  103.                         <div class="card-block">
  104.                             <div class="tab-content tab-validate" id="pills-tabContent">
  105.                                 {% for cat in categories %}
  106.                                     <div class="tab-pane fade {% if loop.first and resultat == false %}show active in{% endif %}" id="pills-{{ cat.classe }}" role="tabpanel" aria-labelledby="pills-{{ cat.classe }}-tab">
  107.                                         {% if cat.id == 1 %}
  108.                                             {{ include('questionnaire/questionnaireEconomiqueTab.html.twig') }}
  109.                                         {% elseif cat.id == 2 %}
  110.                                             {{ include('questionnaire/questionnaireStrategiqueTab.html.twig') }}
  111.                                         {% elseif cat.id == 3 %}
  112.                                             {{ include('questionnaire/questionnaireTechniqueTab.html.twig') }}
  113.                                         {% endif %}
  114.                                         {% if loop.last %}
  115.                                             <div class="row justify-content-around">
  116.                                                 <div class="col-xl-4 col-sm-12 mb-3">
  117.                                                     <label for="departement"><b>Votre département</b> <i class="text-danger">*</i></label>
  118.                                                     <select class="form-control" name="departement" id="departement" required {% if resultat == true %} disabled {% endif %}>
  119.                                                         <option value="" selected>Liste des départements français</option>
  120.                                                         {% for dep in departements %}
  121.                                                             <option {% if exploitation is not null and dep.id == exploitation.departement.id %} selected {% endif %} value="{{ dep.id }}">{{ dep.codeDepartement }} - {{ dep.nomDepartement }}</option>
  122.                                                         {% endfor %}
  123.                                                     </select>
  124.                                                 </div>
  125.                                                 <div class="col-xl-4 col-sm-12 mb-3">
  126.                                                     <label for="exp_systeme"><b>Système de production principal</b> <i class="text-danger">*</i></label>
  127.                                                     <select class="form-control" name="exp_systeme" id="exp_systeme" required {% if resultat == true %} disabled {% endif %}>
  128.                                                         <option value="" selected>Liste des systèmes de production</option>
  129.                                                         {% for sys in systemes %}
  130.                                                             <option {% if exploitation is not null and sys.id == exploitation.systemeProduction.id %} selected {% endif %} value="{{ sys.id }}">{{ sys.libelle }}</option>
  131.                                                         {% endfor %}
  132.                                                     </select>
  133.                                                 </div>
  134.                                             </div>
  135.                                         {% endif %}
  136.                                         <div class="d-flex justify-content-center pt-2">
  137.                                             <span><i class="text-danger">*</i> les champs marqués d'un astérisque sont obligatoires</span>
  138.                                         </div>
  139.                                         {% if resultat == false and loop.last %}
  140.                                             <div class="d-flex justify-content-around">
  141.                                                 <input type="submit" name="valider" value="Valider" class="btn btnColor">
  142.                                             </div>
  143.                                         {% endif %}
  144.                                         <div class="d-flex justify-content-{% if loop.first %}end{% elseif loop.last %}start{% else %}between{% endif %} pl-5 pr-5">
  145.                                             {% if not loop.first %}<button type="button"class="prevtab btn text-white"  style="background: #76bd22">Précédent</button>{% endif %}
  146.                                             {% if not loop.last %}<button type="button" class="nexttab btn text-white"  style="background: #76bd22">Suivant</button>{% endif %}
  147.                                         </div>
  148.                                     </div>
  149.                                 {% endfor %}
  150.                                 {% if resultat == true %}
  151.                                     <div class="tab-pane fade show active in" id="pills-res" role="tabpanel" aria-labelledby="pills-res-tab">
  152.                                         <div class="row mb-4">
  153.                                             {% for cat in categories %}
  154.                                                 <div class="col-xl-6 col-md-6">
  155.                                                     <div class="card mb-3" style="height: auto">
  156.                                                         <div class="card-header" style="height: 50px">
  157.                                                             <h4 class="text-white text-center" style="font-size: 21px">{{ resultatCategorie[cat.id]['libelle'] }}</h4>
  158.                                                         </div>
  159.                                                         <div class="card-block">
  160.                                                             {% if cat.id == 1 %}
  161.                                                                 <div class="row pt-4">
  162.                                                                     <div class="col-xl-5 offset-xl-1">
  163.                                                                         <p>EBE / Produit</p>
  164.                                                                     </div>
  165.                                                                     <div class="col-xl-4 offset-xl-1">
  166.                                                                         <div class="progress">
  167.                                                                             <div style=" {% if ebe_produit >= 0 and ebe_produit <= 20 %} background: red {% elseif ebe_produit >= 20 and ebe_produit <= 40 %} background: orange {% elseif ebe_produit >= 40 and ebe_produit <= 60 %} background: yellow {% elseif ebe_produit >= 60 and ebe_produit <= 80 %} background: yellowgreen {% elseif ebe_produit >= 80 %} background : green {% endif %}; width: {{ ebe_produit }}%; {% if ebe_produit >= 80 %} color : white!important {% endif %}" class="progress-bar" role="progressbar" aria-valuenow="{{ ebe_produit }}" aria-valuemin="0" aria-valuemax="100">{{ ebe_produit }}%</div>
  168.                                                                         </div>
  169.                                                                     </div>
  170.                                                                 </div>
  171.                                                                 <div class="row">
  172.                                                                     <div class="col-xl-5 offset-xl-1">
  173.                                                                         <p>Annuités / EBE</p>
  174.                                                                     </div>
  175.                                                                     <div class="col-xl-4 offset-xl-1">
  176.                                                                         <div class="progress">
  177.                                                                             <div style="width: {{ annuites_ebe }}%;  {% if annuites_ebe >= 0 and annuites_ebe <= 20 %} background: green {% elseif annuites_ebe >= 20 and annuites_ebe <= 40 %} background: yellowgreen {% elseif annuites_ebe >= 40 and annuites_ebe <= 60 %} background: yellow {% elseif annuites_ebe >= 60 and annuites_ebe <= 80 %} background: orange {% elseif annuites_ebe >= 80  %} background : red {% endif %}; {% if annuites_ebe >= 80 %} color : white!important {% endif %}" class="progress-bar" role="progressbar" aria-valuenow="{{ annuites_ebe }}" aria-valuemin="0" aria-valuemax="100">{{ annuites_ebe|raw }}%</div>
  178.                                                                         </div>
  179.                                                                     </div>
  180.                                                                 </div>
  181.                                                                 <div class="row">
  182.                                                                     <div class="col-xl-5 offset-xl-1">
  183.                                                                         <p>Aides PAC / EBE</p>
  184.                                                                     </div>
  185.                                                                     <div class="col-xl-4 offset-xl-1">
  186.                                                                         <div class="progress">
  187.                                                                             <div style=" {% if aides_ebe >= 0 and aides_ebe <= 20 %} color : white!important; {% endif %}; width: {{ aides_ebe }}%; {% if aides_ebe >= 0 and aides_ebe <= 20 %} background: green {% elseif aides_ebe >= 20 and aides_ebe <= 40 %} background: yellowgreen {% elseif aides_ebe >= 40 and aides_ebe <= 60 %} background: yellow {% elseif aides_ebe >= 60 and aides_ebe <= 80 %} background: orange {% elseif aides_ebe >= 80 %} background : red {% endif %}; {% if aides_ebe >= 80 %} color : white!important {% endif %}" class="progress-bar" role="progressbar" aria-valuenow="{{ aides_ebe }}" aria-valuemin="0" aria-valuemax="100">{{ aides_ebe }}%</div>
  188.                                                                         </div>
  189.                                                                     </div>
  190.                                                                 </div>
  191.                                                                 {% if dettes != "" %}
  192.                                                                     <div class="row">
  193.                                                                         <div class="col-xl-5 offset-xl-1">
  194.                                                                             <p>Dettes fournisseurs</p>
  195.                                                                         </div>
  196.                                                                         <div class="col-xl-4 offset-xl-1">
  197.                                                                         {% set dettes = dettes * 10 %}
  198.                                                                             <div class="progress">
  199.                                                                                 <div style="width: {{ dettes }}%; {% if dettes >= 0 and dettes <= 20 %} background: red {% elseif dettes >= 20 and dettes <= 40 %} background: orange {% elseif dettes >= 40 and dettes <= 60 %} background: yellow {% elseif dettes >= 60 and dettes <= 80 %} background: yellowgreen {% elseif dettes >= 80 %} background : green {% endif %}; {% if dettes <= 20 %} color : white!important; {% endif %}" class="progress-bar" role="progressbar" aria-valuenow="{{ dettes }}" aria-valuemin="0" aria-valuemax="100">{{ dettes }}%</div>
  200.                                                                             </div>
  201.                                                                         </div>
  202.                                                                     </div>
  203.                                                                 {% endif %}
  204.                                                             {% endif %}
  205.                                                             <div class="row pt-4">
  206.                                                                 <div class="col-xl-5 offset-xl-1">
  207.                                                                     <h5>Note : </h5>
  208.                                                                 </div>
  209.                                                                 <div class="col-xl-4 offset-xl-1">
  210.                                                                     <div class="progress">
  211.                                                                         <div style="width: {{ resultatCategorie[cat.id]['note'] }}%; {% if resultatCategorie[cat.id]['note'] >= 0 and resultatCategorie[cat.id]['note'] <= 20 %} background: red {% elseif resultatCategorie[cat.id]['note'] >= 20 and resultatCategorie[cat.id]['note'] <= 40 %} background: orange {% elseif resultatCategorie[cat.id]['note'] >= 40 and resultatCategorie[cat.id]['note'] <= 60 %} background: yellow {% elseif resultatCategorie[cat.id]['note'] >= 60 and resultatCategorie[cat.id]['note'] <= 80 %} background: yellowgreen {% elseif resultatCategorie[cat.id]['note'] >= 80 and resultatCategorie[cat.id]['note'] <= 100 %} background : green {% endif %}" class="progress-bar" role="progressbar" aria-valuenow="{{ resultatCategorie[cat.id]['note'] }}" aria-valuemin="0" aria-valuemax="100">{{ resultatCategorie[cat.id]['note'] }}%</div>
  212.                                                                     </div>
  213.                                                                 </div>
  214.                                                             </div>
  215.                                                             <div class="row">
  216.                                                                 <div class="col-xl-10 offset-xl-1">
  217.                                                                     <textarea readonly  class="form-control mb-3">{% if cat.id == 1 %}{{ commentaire_ebe_produit }}{{ commentaire_annuites_ebe }}{{ commentaire_aides_ebe }}{{ commentaire_dettes }}{% endif %}{{ resultatCategorie[cat.id]['commentaire'] }}</textarea>
  218.                                                                 </div>
  219.                                                             </div>
  220.                                                         </div>
  221.                                                     </div>
  222.                                                 </div>
  223.                                             {% endfor %}
  224.                                             <div class="col-xl-6 col-md-6">
  225.                                                 <div class="card" style="height: auto">
  226.                                                     <div class="card-header" style="height: 50px">
  227.                                                         <h4  class="text-white text-center" style="font-size: 21px;">Synthèse globale</h4>
  228.                                                     </div>
  229.                                                     <div class="card-block">
  230.                                                         <div class="row pt-4">
  231.                                                             <div class="col-xl-5 offset-xl-1">
  232.                                                                 <h5>Note totale :</h5>
  233.                                                             </div>
  234.                                                             <div class="col-xl-4 offset-xl-1">
  235.                                                                 <div class="progress">
  236.                                                                     <div style="width: {{ noteTotale }}%; {% if noteTotale >= 0 and noteTotale <= 20 %} background: red {% elseif noteTotale >= 20 and noteTotale <= 40 %} background: orange {% elseif noteTotale >= 40 and noteTotale <= 60 %} background: yellow {% elseif noteTotale >= 60 and noteTotale <= 80 %} background: yellowgreen {% elseif noteTotale >= 80 and noteTotale <= 100 %} background : green {% endif %}" class="progress-bar" role="progressbar" aria-valuenow="{{ noteTotale }}" aria-valuemin="0" aria-valuemax="100">{{ noteTotale }}%</div>
  237.                                                                 </div>
  238.                                                             </div>
  239.                                                         </div>
  240.                                                         <div class="row">
  241.                                                             <div class="col-xl-10 offset-xl-1">
  242.                                                                 <textarea readonly class="form-control">{{ commentaireGlobal }}</textarea>
  243.                                                             </div>
  244.                                                         </div>
  245.                                                     </div>
  246.                                                 </div>
  247.                                             </div>
  248.                                         </div>
  249.                                         <div class="d-flex justify-content-center flex-column p-4" style="background: #76BD22;">
  250.                                             <p class="text-white text-center" style="font-size: 20px">
  251.                                                 Souhaitez vous améliorer votre situation et être contacté(e) sans engagement par un conseiller ?
  252.                                             </p>
  253.                                             <div class="d-flex justify-content-center">
  254.                                                 <button id="btnExp2" type="button" style="margin: 0" class="btn btnColor float-right">Je souhaite être contacté(e) par un conseiller</button>
  255.                                             </div>
  256.                                         </div>
  257.                                     </div>
  258.                                     <div class="tab-pane fade" id="pills-exploitation" role="tabpanel" aria-labelledby="pills-exploitation-tab">
  259.                                         <input type="hidden" name="exploitationId" value="{{ exploitation.id }}">
  260.                                         <div class="d-flex justify-content-center pb-3 pt-4">
  261.                                             <h2 class="h3 text-center" style="color: #76bd22">Renseignez les informations concernant votre exploitation</h2>
  262.                                         </div>
  263.                                         <div class="row pt-3">
  264.                                             <div class="col-xl-6 offset-xl-3 mb-3">
  265.                                                 <label for="exp_nomExp">Nom de l'exploitation <i class="text-danger">*</i></label>
  266.                                                 <input type="text" maxlength="255" class="form-control form-control-sm" name="exp_nomExp" id="exp_nomExp" required>
  267.                                             </div>
  268.                                         </div>
  269.                                         <div class="row">
  270.                                             <div class="col-xl-6 offset-xl-3 mb-3">
  271.                                                 <label for="exp_nomResp">Nom - Prénom <i class="text-danger">*</i></label>
  272.                                                 <input type="text" maxlength="255" class="form-control  form-control-sm" name="exp_nomResp" id="exp_nomResp" required>
  273.                                             </div>
  274.                                         </div>
  275.                                         <div class="row">
  276.                                             <div class="col-xl-6 offset-xl-3 mb-3">
  277.                                                 <label for="exp_adresse">Adresse <i class="text-danger">*</i></label>
  278.                                                 <input type="text" maxlength="255" class="form-control form-control-sm" name="exp_adresse" id="exp_adresse" required>
  279.                                             </div>
  280.                                         </div>
  281.                                         <div class="row">
  282.                                             <div class="col-xl-2 offset-xl-3 mb-3">
  283.                                                 <label for="exp_cp">Code postal <i class="text-danger">*</i></label>
  284.                                                 <input type="text" minlength="5" maxlength="5" class="form-control form-control-sm" name="exp_cp" id="exp_cp" required>
  285.                                             </div>
  286.                                             <div class="col-xl-4 offset-xl-0 mb-3">
  287.                                                 <label for="exp_ville">Ville <i class="text-danger">*</i></label>
  288.                                                 <input type="text" maxlength="100" class="form-control form-control-sm" name="exp_ville" id="exp_ville" required>
  289.                                             </div>
  290.                                         </div>
  291.                                         <div class="row">
  292.                                             <div class="col-xl-3 offset-xl-3 mb-3">
  293.                                                 <label for="exp_mail">Adresse mail <i class="text-danger">*</i></label>
  294.                                                 <input type="email" maxlength="255" class="form-control form-control-sm" name="exp_mail" id="exp_mail" required>
  295.                                             </div>
  296.                                             <div class="col-xl-3 offset-xl-0 mb-3">
  297.                                                 <label for="exp_tel">Numéro de téléphone <i class="text-danger">*</i></label>
  298.                                                 <input type="tel" minlength="10" maxlength="10" placeholder="ex: 0612345678" class="form-control form-control-sm" name="exp_tel" id="exp_tel" required>
  299.                                             </div>
  300.                                         </div>
  301.                                         <div class="row">
  302.                                             <div class="col-xl-6 offset-xl-3 mb-3">
  303.                                                 <label for="exp_adresse">Précisez vos attentes</label>
  304.                                                 <textarea maxlength="255" class="form-control form-control-sm" name="exp_message" id="exp_message" ></textarea>
  305.                                             </div>
  306.                                         </div>
  307.                                         <div class="d-flex justify-content-center flex-column p-4">
  308.                                             <p class="text-dark text-center" style="font-size: 15px">
  309.                                                 {{ mentionsLegales.texte|raw }}
  310.                                             </p>
  311.                                             <div class="form-check text-center">
  312.                                                 <input class="form-check-input" id="mentions" name="acceptermentions" type="checkbox" required>
  313.                                                 <label class="form-check-label" for="mentions">J'accepte les mentions légales<i class="text-danger">*</i></label>
  314.                                             </div>
  315.                                         </div>
  316.                                         <div class="d-flex justify-content-center">
  317.                                             <input type="submit" class="btn" style="background: #76bd22; color: white" name="validerExploitation" value="Valider">
  318.                                         </div>
  319.                                     </div>
  320.                                 {% endif %}
  321.                             </div>
  322.                         </div>
  323.                     </form>
  324.                 </div>
  325.             </div>
  326.         </div>
  327.     </div>
  328. {% endblock %}
  329. {% block javascripts %}
  330.     <script src="{{ asset('plugins/validate/jquery.validate.min.js') }}"></script>
  331.     <script src="{{ asset('plugins/validate/additional-methods.min.js') }}"></script>
  332.     <script src="{{ asset('plugins/validate/messages_fr.js') }}"></script>
  333.     <script src="{{ asset('plugins/barrating/jquery.barrating.min.js') }}"></script>
  334.     <script src="{{ asset('js/autosize.min.js') }}"></script>
  335.     <script>
  336.         function myFunction(element, id) {
  337.             var dataValue = $(element).data("value");
  338.             var dataId = $(element).data("id");
  339.             $("#libelle_"+id).text(dataId+' - '+dataValue);
  340.         }
  341.         $(document).ready( function () {
  342.             autosize($('textarea'));
  343.             $('#btnExp').on('click', function (e) {
  344.                 e.preventDefault();
  345.                 $('#pills-tab a[href="#pills-exploitation"]').tab('show');
  346.             });
  347.             $('#btnExp2').on('click', function (e) {
  348.                 e.preventDefault();
  349.                 $('#pills-tab a[href="#pills-exploitation"]').tab('show');
  350.             });
  351.             var i, items = $('.nav-link'), pane = $('.tab-pane');
  352.             // next
  353.             $('.nexttab').on('click',function(){
  354.                 $(window).scrollTop(0);
  355.                 for(i = 0; i < items.length; i++){
  356.                     if($(items[i]).hasClass('active') ==true){
  357.                         break;
  358.                     }
  359.                 }
  360.                 if(i < items.length - 1){
  361.                     // for tab
  362.                     $(items[i]).removeClass('active');
  363.                     $(items[i+1]).addClass('active');
  364.                     // for pane
  365.                     $(pane[i]).removeClass('show active');
  366.                     $(pane[i+1]).addClass('show active');
  367.                 }
  368.             });
  369.             // Prev
  370.             $('.prevtab').on('click',function(){
  371.                 $(window).scrollTop(0);
  372.                 for(i = 0; i < items.length; i++){
  373.                     if($(items[i]).hasClass('active') ==true){
  374.                         break;
  375.                     }
  376.                 }
  377.                 if(i != 0){
  378.                     // for tab
  379.                     $(items[i]).removeClass('active');
  380.                     $(items[i-1]).addClass('active');
  381.                     // for pane
  382.                     $(pane[i]).removeClass('show active');
  383.                     $(pane[i-1]).addClass('show active');
  384.                 }
  385.             });
  386.         });
  387.         $(function () {
  388.             $('form[name=question]').validate({
  389.                 ignore: [],
  390.                 invalidHandler: function () {
  391.                     setTimeout(function () {
  392.                         $('.nav-pills a span.required').remove();
  393.                         // $('.tab-content.tab-validate .tab-pane:has(input.error)').each(function () {
  394.                         //     var id = $(this).attr('id');
  395.                         //     $('.nav-pills').find('a[href^="#' + id + '"]').append(' <span class="required">***</span>');
  396.                         // });
  397.                         $('.tab-content.tab-validate .tab-pane:has(select.error) , .tab-content.tab-validate .tab-pane:has(input.error)').each(function () {
  398.                             var id = $(this).attr('id');
  399.                             $('.nav-pills').find('a[href^="#' + id + '"]').append(' <span class="required">***</span>');
  400.                         });
  401.                     });
  402.                 },
  403.                 errorPlacement: function (error,element) {
  404.                     if(element.attr("type") == "radio"){
  405.                         let id = element.attr("id");
  406.                         id = id.split('_')[1];
  407.                         error.insertAfter('#error_reponse_' + id);
  408.                     }
  409.                     else if(element.attr("name") == "produit"){
  410.                         error.insertAfter('#error_produit');
  411.                     }
  412.                     else if(element.attr("name") == "EBE"){
  413.                         error.insertAfter('#error_EBE');
  414.                     }
  415.                     else if(element.attr("name") == "annuites"){
  416.                         error.insertAfter('#error_annuites');
  417.                     }
  418.                     else if(element.attr("name") == "pac"){
  419.                         error.insertAfter('#error_pac');
  420.                     }
  421.                     else{
  422.                         error.insertAfter(element);
  423.                     }
  424.                 }
  425.             });
  426.         });
  427.     </script>
  428. {% endblock %}