templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.         <title>{% block title %}ABXBMI{% endblock %}</title>
  7.         {# <link rel="icon" href="{{ asset('build/img/icon1024.png') }}"></link> #}
  8.         <link rel="icon" type="image.png" sizes="32x32" href="{{ asset('build/img/favicon-32x32.png') }}">
  9.         <link rel="icon" type="image.png" sizes="16x16" href="{{ asset('build/img/favicon-16x16.png') }}">
  10.         <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('build/img/faviconIphone.png') }}">
  11.         {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
  12.         {% block stylesheets %}
  13.             {{ encore_entry_link_tags('app') }}
  14.         {% endblock %} 
  15.         {# <link rel="stylesheet" href="..\assets\styles\app.css"></link> #}
  16.         <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
  17.         <style>
  18.             .autocomplete-container {
  19.                 position: relative;
  20.             }
  21.             .autocomplete-suggestions {
  22.                 position: absolute;
  23.                 top: 100%;
  24.                 left: 0;
  25.                 right: 0;
  26.                 z-index: 1020;
  27.                 background-color: #ffffff;
  28.                 border: 1px solid #ced4da;
  29.                 border-top: none;
  30.                 max-height: 200px;
  31.                 overflow-y: auto;
  32.                 display: none;
  33.             }
  34.             .autocomplete-item {
  35.                 display: block;
  36.                 width: 100%;
  37.                 padding: 6px 12px;
  38.                 text-align: left;
  39.                 background: transparent;
  40.                 border: none;
  41.                 border-bottom: 1px solid #e9ecef;
  42.                 cursor: pointer;
  43.             }
  44.             .autocomplete-item:last-child {
  45.                 border-bottom: none;
  46.             }
  47.             .autocomplete-item.active,
  48.             .autocomplete-item:hover,
  49.             .autocomplete-item:focus {
  50.                 background-color: #f2f6ff;
  51.                 outline: none;
  52.             }
  53.         </style>
  54.         {% block javascripts %}
  55.             {{ encore_entry_script_tags('app') }}
  56.             <!-- Google tag (gtag.js) -->
  57.             <script async src="https://www.googletagmanager.com/gtag/js?id=G-RTG28H3XZF"></script>
  58.             <script>
  59.                 window.dataLayer = window.dataLayer || [];
  60.                 function gtag(){
  61.                     dataLayer.push(arguments);
  62.                 }
  63.                 gtag('js', new Date());
  64.                 gtag('config', 'G-RTG28H3XZF');
  65.             </script>
  66.             <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
  67.             <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
  68.             <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
  69.             <script>
  70.                 const accentReplacements = {
  71.                     '\u00e0': 'a',
  72.                     '\u00e1': 'a',
  73.                     '\u00e2': 'a',
  74.                     '\u00e3': 'a',
  75.                     '\u00e4': 'a',
  76.                     '\u00e5': 'a',
  77.                     '\u00e6': 'ae',
  78.                     '\u00e7': 'c',
  79.                     '\u00e8': 'e',
  80.                     '\u00e9': 'e',
  81.                     '\u00ea': 'e',
  82.                     '\u00eb': 'e',
  83.                     '\u00ec': 'i',
  84.                     '\u00ed': 'i',
  85.                     '\u00ee': 'i',
  86.                     '\u00ef': 'i',
  87.                     '\u00f1': 'n',
  88.                     '\u00f2': 'o',
  89.                     '\u00f3': 'o',
  90.                     '\u00f4': 'o',
  91.                     '\u00f5': 'o',
  92.                     '\u00f6': 'o',
  93.                     '\u00f8': 'o',
  94.                     '\u0153': 'oe',
  95.                     '\u00f9': 'u',
  96.                     '\u00fa': 'u',
  97.                     '\u00fb': 'u',
  98.                     '\u00fc': 'u',
  99.                     '\u00fd': 'y',
  100.                     '\u00ff': 'y',
  101.                     '\u00df': 'ss'
  102.                 };
  103.                 $( document ).ready(function() {
  104.                     document.getElementById('calcPatient').style.height = 'calc(100% - (' + document.getElementById('titrePatient').offsetHeight + 'px + ' + $('#titrePatient').css('margin-top') +' + ' + $('#titrePatient').css('margin-bottom') + ' + ' + $('#calcPatient').css('margin-bottom') + ' + ' + $('#calcPatient').css('border-bottom-width') + ' + ' + $('#calcPatient').css('border-top-width') + '))';
  105.                     document.getElementById('calcPrescription').style.height = 'calc(100% - (' + document.getElementById('titrePrescription').offsetHeight + 'px + ' + $('#titrePrescription').css('margin-top') +' + ' + $('#titrePrescription').css('margin-bottom') + ' + ' + $('#calcPrescription').css('margin-bottom') + ' + ' + $('#calcPrescription').css('border-bottom-width') + ' + ' + $('#calcPrescription').css('border-top-width') + '))';
  106.                     var antibioInput = document.getElementById('antibioEntry');
  107.                     var antibioSuggestions = document.getElementById('antibioSuggestions');
  108.                     var antibioAutocomplete = document.getElementById('antibioAutocomplete');
  109.                     if (antibioInput && antibioSuggestions && antibioAutocomplete && antibioInput.tagName === 'INPUT' && antibioInput.dataset.antibiotiques) {
  110.                         const antibios = JSON.parse(antibioInput.dataset.antibiotiques);
  111.                         const normalizedAntibios = antibios.map(function(label) {
  112.                             return {
  113.                                 label: label,
  114.                                 normalized: normalizeAntibiotic(label)
  115.                             };
  116.                         });
  117.                         var currentSuggestions = [];
  118.                         var activeSuggestionIndex = -1;
  119.                         const clearSuggestions = function() {
  120.                             antibioSuggestions.innerHTML = '';
  121.                             antibioSuggestions.style.display = 'none';
  122.                             currentSuggestions = [];
  123.                             activeSuggestionIndex = -1;
  124.                         };
  125.                         const highlightSuggestion = function(index) {
  126.                             var items = antibioSuggestions.querySelectorAll('.autocomplete-item');
  127.                             if (!items.length) {
  128.                                 return;
  129.                             }
  130.                             items.forEach(function(item, itemIndex) {
  131.                                 if (itemIndex === index) {
  132.                                     item.classList.add('active');
  133.                                     item.scrollIntoView({ block: 'nearest' });
  134.                                 } else {
  135.                                     item.classList.remove('active');
  136.                                 }
  137.                             });
  138.                             activeSuggestionIndex = index;
  139.                         };
  140.                         const applySuggestion = function(item) {
  141.                             antibioInput.value = item.label;
  142.                             clearSuggestions();
  143.                             checkATB();
  144.                         };
  145.                         const renderSuggestions = function(filterValue) {
  146.                             const normalizedFilter = normalizeAntibiotic(filterValue.trim());
  147.                             antibioSuggestions.innerHTML = '';
  148.                             currentSuggestions = [];
  149.                             activeSuggestionIndex = -1;
  150.                             var candidateSuggestions;
  151.                             if (normalizedFilter === '') {
  152.                                 candidateSuggestions = normalizedAntibios;
  153.                             } else {
  154.                                 candidateSuggestions = normalizedAntibios.filter(function(item) {
  155.                                     return item.normalized.includes(normalizedFilter);
  156.                                 });
  157.                             }
  158.                             if (!candidateSuggestions.length) {
  159.                                 clearSuggestions();
  160.                                 return;
  161.                             }
  162.                             candidateSuggestions.forEach(function(item) {
  163.                                 var suggestionIndex = currentSuggestions.length;
  164.                                 var button = document.createElement('button');
  165.                                 button.type = 'button';
  166.                                 button.className = 'autocomplete-item';
  167.                                 button.textContent = item.label;
  168.                                 button.addEventListener('mouseenter', function() {
  169.                                     highlightSuggestion(suggestionIndex);
  170.                                 });
  171.                                 button.addEventListener('mousedown', function(event) {
  172.                                     event.preventDefault();
  173.                                     applySuggestion(item);
  174.                                 });
  175.                                 antibioSuggestions.appendChild(button);
  176.                                 currentSuggestions.push(item);
  177.                             });
  178.                             if (currentSuggestions.length) {
  179.                                 antibioSuggestions.style.display = 'block';
  180.                             } else {
  181.                                 clearSuggestions();
  182.                             }
  183.                         };
  184.                         antibioInput.addEventListener('input', function(event) {
  185.                             renderSuggestions(event.target.value);
  186.                         });
  187.                         antibioInput.addEventListener('focus', function(event) {
  188.                             renderSuggestions(event.target.value);
  189.                         });
  190.                         antibioInput.addEventListener('keydown', function(event) {
  191.                             if (!currentSuggestions.length) {
  192.                                 if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
  193.                                     renderSuggestions(antibioInput.value);
  194.                                 }
  195.                                 return;
  196.                             }
  197.                             if (event.key === 'ArrowDown') {
  198.                                 event.preventDefault();
  199.                                 var nextIndex = (activeSuggestionIndex + 1) % currentSuggestions.length;
  200.                                 highlightSuggestion(nextIndex);
  201.                             } else if (event.key === 'ArrowUp') {
  202.                                 event.preventDefault();
  203.                                 var previousIndex = activeSuggestionIndex <= 0 ? currentSuggestions.length - 1 : activeSuggestionIndex - 1;
  204.                                 highlightSuggestion(previousIndex);
  205.                             } else if (event.key === 'Enter') {
  206.                                 if (activeSuggestionIndex >= 0 && activeSuggestionIndex < currentSuggestions.length) {
  207.                                     event.preventDefault();
  208.                                     applySuggestion(currentSuggestions[activeSuggestionIndex]);
  209.                                 }
  210.                             } else if (event.key === 'Escape') {
  211.                                 clearSuggestions();
  212.                             }
  213.                         });
  214.                         antibioInput.addEventListener('blur', function() {
  215.                             setTimeout(function() {
  216.                                 clearSuggestions();
  217.                             }, 150);
  218.                         });
  219.                         document.addEventListener('click', function(event) {
  220.                             if (!antibioAutocomplete.contains(event.target)) {
  221.                                 clearSuggestions();
  222.                             }
  223.                         });
  224.                     }
  225.                 });
  226.                 window.addEventListener('resize', function(event) {
  227.                     document.getElementById('calcPatient').style.height = 'calc(100% - (' + document.getElementById('titrePatient').offsetHeight + 'px + ' + $('#titrePatient').css('margin-top') +' + ' + $('#titrePatient').css('margin-bottom') + ' + ' + $('#calcPatient').css('margin-bottom') + ' + ' + $('#calcPatient').css('border-bottom-width') + ' + ' + $('#calcPatient').css('border-top-width') + '))';
  228.                     document.getElementById('calcPrescription').style.height = 'calc(100% - (' + document.getElementById('titrePrescription').offsetHeight + 'px + ' + $('#titrePrescription').css('margin-top') +' + ' + $('#titrePrescription').css('margin-bottom') + ' + ' + $('#calcPrescription').css('margin-bottom') + ' + ' + $('#calcPrescription').css('border-bottom-width') + ' + ' + $('#calcPrescription').css('border-top-width') + '))';
  229.                 }, true);
  230.                 function concatUrl(base, path) {
  231.                     return base.replace(/\/+$/, '') + '/' + path.replace(/^\/+/, '');
  232.                 }
  233.                 function disableText() {
  234.                     var radio = document.getElementById("mgkgj");
  235.                     var text = document.getElementById("mgkgjEntry");
  236.                     text.disabled = !radio.checked;
  237.                     var text2 = document.getElementById("mgkgdoseEntry");
  238.                     text2.disabled = true;
  239.                     text2.value = '';
  240.                 }
  241.                 function disableText2() {
  242.                     var radio = document.getElementById("mgkgdose");
  243.                     var text = document.getElementById("mgkgdoseEntry");
  244.                     text.disabled = !radio.checked;
  245.                     var text2 = document.getElementById("mgkgjEntry");
  246.                     text2.disabled = true;
  247.                     text2.value = '';
  248.                 }
  249.                 function normalizeAntibiotic(value) {
  250.                     if (!value) {
  251.                         return '';
  252.                     }
  253.                     var text = value.toString();
  254.                     if (typeof text.normalize === 'function') {
  255.                         text = text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
  256.                     }
  257.                     text = text.toLowerCase();
  258.                     return text.replace(/[^\u0000-\u007E]/g, function(character) {
  259.                         return accentReplacements[character] || character;
  260.                     });
  261.                 }
  262.                 function checkATB(){
  263.                     document.getElementById("doseStandard").innerHTML = "";
  264.                     var match = false;
  265.                     var entry = document.getElementById("antibioEntry");
  266.                     const antibios = JSON.parse(entry.dataset.antibiotiques);
  267.                     var texte = entry.value.trim();
  268.                     var texteNormalise = normalizeAntibiotic(texte);
  269.                     document.getElementById("recommandationDiv").style.display = "none";
  270.                     document.getElementById("noRecommandationDiv").style.display = "none";
  271.                     var newDivLoader = document.getElementById('loader').cloneNode(true);
  272.                     document.getElementById('doseStandard').appendChild(newDivLoader);
  273.                     document.getElementById('doseStandard').style.display = "block";
  274.                     newDivLoader.style.display = 'block';
  275.                     
  276.                     for (let i = 0; i <= antibios.length - 1; i++){
  277.                         var antibioCourant = antibios[i];
  278.                         if(texteNormalise !== '' && normalizeAntibiotic(antibioCourant) === texteNormalise){
  279.                             
  280.                             let url = new URL("{{ path('checkatb', {'_locale': app.request.locale})|e('js') }}", window.location.origin);
  281.                             url.searchParams.set('antibiotique', antibioCourant);
  282.                             fetch(url.toString())
  283.                                 .then(response => response.json())
  284.                                 .then(data => {
  285.                                     document.getElementById('doseStandard').innerHTML = data.content;
  286.                                     newDivLoader.style.display = 'none';
  287.                                 })
  288.                                 .catch(error => {
  289.                                     console.log("error :", error);
  290.                                     newDivLoader.style.display = 'none';
  291.                             });
  292.                             match = true;
  293.                             entry.value = antibioCourant;
  294.                             break;
  295.                         }else if (match == false){
  296.                             if(i == antibios.length - 1){
  297.                                 document.getElementById('doseStandard').style.display = 'none';
  298.                             }
  299.                         }
  300.                     }
  301.                 }
  302.                 function calculCliked(){
  303.                     document.getElementById("recommandationDiv").style.display = "none";
  304.                     document.getElementById("noRecommandationDiv").style.display = "none";
  305.                     
  306.                     var newDivLoader = document.getElementById('loader').cloneNode(true);
  307.                     document.getElementById('recomandationBlock').appendChild(newDivLoader);
  308.                     newDivLoader.style.display = 'block';
  309.                     
  310.                     var antibioVal = document.getElementById("antibioEntry").value;
  311.                     var sexeVal = document.getElementById("sexeSelect").value;
  312.                     var poidsVal = document.getElementById("poidsEntry").value;
  313.                     var tailleVal = document.getElementById("tailleEntry").value;
  314.                     var doseVal = (document.getElementById("mgkgjEntry").value == '') ? (document.getElementById("mgkgdoseEntry").value) : (document.getElementById("mgkgjEntry").value);
  315.                     if(antibioVal != '' && antibioVal != null ){
  316.                         if(sexeVal == 1 || sexeVal == 2){
  317.                             if(poidsVal != '' && poidsVal != null && poidsVal != 0){
  318.                                 if(tailleVal != '' && tailleVal != null && tailleVal != 0){
  319.                                     if(doseVal != '' && doseVal != null && doseVal != 0){
  320.                                         let url = new URL("{{ path('calcul', {'_locale': app.request.locale})|e('js') }}", window.location.origin);
  321.                                         url.searchParams.set('antibiotique', antibioVal);
  322.                                         url.searchParams.set('sexe', sexeVal);
  323.                                         url.searchParams.set('poids', poidsVal);
  324.                                         url.searchParams.set('taille', tailleVal);
  325.                                         url.searchParams.set('dose', doseVal);
  326.                                         
  327.                                         fetch(url.toString())
  328.                                             .then(response => response.json())
  329.                                             .then(data => {
  330.                                                 document.getElementById("recommandationDiv").style.display = "none";
  331.                                                 document.getElementById("noRecommandationDiv").style.display = "none";
  332.                                                 if(data.content == "Aucun calcul pour cet antibiotique."){
  333.                                                     newDivLoader.style.display = 'none';
  334.                                                     document.getElementById("noRecommandationDiv").style.display = "block";
  335.                                                 }else{
  336.                                                     document.getElementById('bmiClient').innerHTML  = data.content.datas.situation_bmi;
  337.                                                     let recommandation = 'let abw = ' + data.content.datas.abw +';let bmi = ' + data.content.datas.bmi +';let dose =' + data.content.datas.dose + ';let ibw = ' + data.content.datas.ibw +';let interpretation_bmi = "' + data.content.datas.interpretation_bmi +'";let lbw = ' + data.content.datas.lbw +';let libelleAntibiotique = "' + data.content.datas.libelleAntibiotique + '";let libelleFamilleAntibiotique = "' + data.content.datas.libelleFamilleAntibiotique + '";let poids = ' + data.content.datas.poids +';let sexe = ' + data.content.datas.sexe +';let situation = "' + data.content.datas.situation + '";let situation_bmi = "' + data.content.datas.situation_bmi + '";let taille = '+ data.content.datas.taille + ';let x_abw = '+ data.content.datas.x_abw + ';' + data.content.datas.recommandation.replace(/\t/g, "").replace(/\n/g, "").replace(/\"/g, '"');
  338.                                                     let func = new Function(recommandation);
  339.                                                     func();
  340.                                                     document.getElementById('bmiClient').innerHTML  = data.content.datas.situation_bmi;
  341.                                                     
  342.                                                     document.getElementById('referencesChild').innerHTML = data.content.datas.reference;
  343.                                                      newDivLoader.style.display = 'none';
  344.                                                     document.getElementById("recommandationDiv").style.display = "block";
  345.                                                 }
  346.                                             })
  347.                                             .catch(error => {
  348.                                                 console.log("error :", error);
  349.                                                 newDivLoader.style.display = 'none';
  350.                                         });
  351.                                     }else{
  352.                                         if(document.getElementById("mgkgj").checked){
  353.                                             newDivLoader.style.display = 'none';
  354.                                             document.getElementById("modelText").innerHTML = "{{ 'labels.errors.mg/kg/j'|trans|e('js') }}";
  355.                                             $("#modal").modal('show');
  356.                                         }else if (document.getElementById("mgkgdose").checked){
  357.                                             newDivLoader.style.display = 'none';
  358.                                             document.getElementById("modelText").innerHTML = "{{ 'labels.errors.mg/kg/dose'|trans|e('js') }}";
  359.                                             $("#modal").modal('show');
  360.                                         }else{
  361.                                             newDivLoader.style.display = 'none';
  362.                                             document.getElementById("modelText").innerHTML = "{{ 'labels.errors.dose'|trans|e('js') }}";
  363.                                             $("#modal").modal('show');
  364.                                         }
  365.                                     }
  366.                                 }else{
  367.                                     newDivLoader.style.display = 'none';
  368.                                     document.getElementById("modelText").innerHTML = "{{ 'labels.errors.height'|trans|e('js') }}";
  369.                                     $("#modal").modal('show');
  370.                                 }
  371.                             }else{
  372.                                 newDivLoader.style.display = 'none';
  373.                                 document.getElementById("modelText").innerHTML = "{{ 'labels.errors.weight'|trans|e('js') }}";
  374.                                 $("#modal").modal('show');
  375.                             }
  376.                         }else{
  377.                             newDivLoader.style.display = 'none';
  378.                             document.getElementById("modelText").innerHTML = "{{ 'labels.errors.sexe'|trans|e('js') }}";
  379.                             $("#modal").modal('show');
  380.                         }
  381.                     }else{
  382.                         newDivLoader.style.display = 'none';
  383.                         document.getElementById("modelText").innerHTML = "{{ 'labels.errors.antb'|trans|e('js') }}";
  384.                         $("#modal").modal('show');
  385.                     }
  386.                 }
  387.             </script>
  388.         {% endblock %}
  389.     </head>
  390.     <body>
  391.     <div id="loader" style="display: none;">
  392.         <div style="text-align: center; justify-content: center; display: flex;">
  393.             <div style="border: 16px solid #cd3c3e; border-top: 16px solid #fff; border-radius: 50%; width: 120px; height: 120px; animation: spin 2s linear infinite;"></div>
  394.         </div>
  395.     </div>
  396.         <div id="content">
  397.             {% set currentLocale = app.request.locale %}
  398.             {# --------------------------------------------------- HEADER ---------------------------------------------------#}
  399.             {% include 'include/header.html.twig' %}
  400.             {# --------------------------------------------------- HEADER ---------------------------------------------------#}
  401.             
  402.             <div class="container">
  403.                 <div id="calcul">
  404.                     <div id="patient">
  405.                         <p id="titrePatient" class="titreForm"><strong>{{ 'labels.patient'|trans }}</strong></p>
  406.                         <div id="calcPatient" class="form1">
  407.                             {# Sexe #}
  408.                             <div class="form">
  409.                                 <p class='sousTitreForm'>{{ 'labels.sex'|trans }}</p>
  410.                                 <select name="sexe" id="sexeSelect">
  411.                                     <option value="1">{{ 'sex.man'|trans }}</option>
  412.                                     <option value="2">{{ 'sex.woman'|trans }}</option>
  413.                                 </select>
  414.                             </div>
  415.                             {# Poids #}
  416.                             <div class="form">
  417.                                 <p class='sousTitreForm'>{{ 'labels.weight'|trans }}</p>
  418.                                 <input type="number" id="poidsEntry"></input>
  419.                             </div>
  420.                             {# Taille #}
  421.                             <div class="form">
  422.                                 <p class='sousTitreForm'>{{ 'labels.height'|trans }}</p>
  423.                                 <input type="number" id="tailleEntry"></input>
  424.                             </div>
  425.                         </div>
  426.                     </div>
  427.                     <div id="prescription">
  428.                         <p id="titrePrescription" class="titreForm"><strong>{{ 'labels.prescription'|trans }}</strong></p>
  429.                         <div id="calcPrescription" class="form1">
  430.                             <div id="atbEntry" class="form">
  431.                                 {# {% if antibiogarde == 1 %}
  432.                                     <select id="antibioEntry" data-antibiotiques='{{ antibiotiques|json_encode() }}' onchange="checkATB();">
  433.                                         <option>{{ 'labels.selectAtb'|trans }}</option>
  434.                                         {% for option in antibiotiques %}
  435.                                             <option>{{ option|raw }}</option>
  436.                                         {% endfor %}
  437.                                     </select>
  438.                                 {% else %} #}
  439.                                     <div id="antibioAutocomplete" class="autocomplete-container">
  440.                                         <input type="search" id="antibioEntry" placeholder="{{ 'labels.antibiotiques'|trans }}" autocomplete="off" data-antibiotiques='{{ antibiotiques|json_encode() }}' onchange="checkATB();"></input>
  441.                                         <div id="antibioSuggestions" class="autocomplete-suggestions"></div>
  442.                                     </div>
  443.                                 {# {% endif %} #}
  444.              </div>
  445.                             <div class="form">
  446.                                 <p style="margin:0; margin-bottom: 0;">{{ 'labels.standardDose'|trans }}</p>
  447.                                 {# equivalence vie BDD #}
  448.                                 <strong>
  449.                                     <div id="doseStandard">
  450.                                     </div>
  451.                                 </strong>
  452.                             </div>
  453.                             <div class="form">
  454.                                 <p style="margin:0; margin-bottom: 0;">{{ 'labels.givenDosage'|trans }}</p>
  455.                                 <div id="radioDiv" class="container">
  456.                                     <div style="margin: 10px;">
  457.                                         <div>
  458.                                             <input type="radio" id="mgkgj" name="drone" value="mgkgj" onchange="disableText()">
  459.                                             <label for="mgkgj">{{ 'labels.mg/kg/j'|trans }}</label>
  460.                                         </div>
  461.                                         <input type="number" id="mgkgjEntry" disabled></input>
  462.                                     </div>
  463.                                     <div style="margin: 10px;">
  464.                                         <div>
  465.                                             <input type="radio" id="mgkgdose" name="drone" value="mgkgdose" onchange="disableText2()">
  466.                                             <label for="mgkgdose">{{ 'labels.mg/kg/dose'|trans }}</label>
  467.                                         </div>
  468.                                         <input type="number" id="mgkgdoseEntry" disabled></input>
  469.                                     </div>
  470.                                 </div>
  471.                             </div>
  472.                         </div>
  473.                     </div>
  474.                 </div>
  475.                 <div id="bouttonCalcul">
  476.                     <button type="button" id="btnCalc" onClick="calculCliked();"><strong>{{ 'answer.recommendationTitle'|trans }}</strong></button>
  477.                 </div>
  478.                 <div id="recomandationBlock">
  479.                     <div id="recommandationDiv">
  480.                         <div id="reco">
  481.                             <p style="margin:0; margin-bottom: 0;"><strong>{{ 'answer.recommandation'|trans }}</strong></p>
  482.                         </div>
  483.                         <div style="padding: 20px;">
  484.                             <div>
  485.                                 <p style="margin:0; margin-bottom: 0;" id="bmiClient"></p> 
  486.                             </div>
  487.                             <div style="padding-top: 20px;">
  488.                                 <p style="margin:0; margin-bottom: 0;" id="recommandation"></p>
  489.                             </div>
  490.                             <div style="padding-top: 20px;">
  491.                                 {# conseil recup en BDD #}
  492.                                 <p style="margin:0; margin-bottom: 0;" id="adaptation_poso"></p>
  493.                             </div>
  494.                             <div id="references" style="padding-top: 20px;">
  495.                                 <p style="margin:0; margin-bottom: 0;" id="ref"><strong>{{ 'answer.references'|trans }}</strong></p>
  496.                                 {# boucle for reach sur les références dispo en BDD #}
  497.                                 <div id="referencesChild">
  498.                                     {# en js ajoute des enfants avec les références #}
  499.                                 </div>
  500.                             </div>
  501.                         </div>
  502.                     </div>
  503.                     <div id="noRecommandationDiv">
  504.                         {{ 'answer.noCalcul'|trans }}
  505.                     </div>
  506.                 </div>
  507.             </div>
  508.         </div>
  509.         {# --------------------------------------------------- ------ ---------------------------------------------------#}
  510.         {# --------------------------------------------------- FOOTER ---------------------------------------------------#}
  511.         {# --------------------------------------------------- ------ ---------------------------------------------------#}
  512.         {% include 'include/footer.html.twig' %}
  513.         <!-- Modal -->
  514.         <div id="modal" class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
  515.             <div class="modal-dialog">
  516.                 <div class="modal-content">
  517.                     <div class="modal-header">
  518.                         <h1 class="modal-title fs-5" id="staticBackdropLabel">{{ 'modal.attention'|trans }}</h1>
  519.                         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  520.                     </div>
  521.                     <div class="modal-body">
  522.                         <p id="modelText"></p>
  523.                     </div>
  524.                     <div class="modal-footer">
  525.                         <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ 'modal.ok'|trans }}</button>
  526.                     </div>
  527.                 </div>
  528.             </div>
  529.         </div>
  530.     </body>
  531. </html>