Example #1
0
 function formHeure($champ, $valeur, $disabled)
 {
     $label = formatLabel($champ);
     //defini classe (intervalle, datetimepicker)
     $classe = "";
     if ($champ == 'fin') {
         $classe = "class='time_to'";
     }
     if ($champ == 'debut') {
         $classe = "class='time_from'";
     }
     if (isset($_POST[$champ])) {
         //echo $_POST[$champ];
         $lheure = filter_input(INPUT_POST, $champ);
     } else {
         $lheure = dateUsToFr($valeur);
     }
     echo "<td>" . $label . " </td><td><input type=text " . $disabled . " " . $classe . " style='background:yellow;' name=" . $champ . " id=" . $champ . " value = '" . $lheure . "'></td>";
 }
Example #2
0
     }
     echo "</td>";
     break;
     //autres champs : affichage valeur du champ
 //autres champs : affichage valeur du champ
 default:
     $post = '';
     $nowrap = "nowrap='nowrap'";
     $largeur = 70;
     //date on formate bien
     if ($key == 'debut' or $key == 'fin' or substr($key, 0, 4) == 'date') {
         if ($titre == "intervention") {
             $ligne[$key] = dateUsToFr($ligne[$key]);
             $largeur = 70;
         } else {
             $ligne[$key] = dateUsToFr($ligne[$key]);
             $largeur = 70;
         }
     }
     //float on ajoute unité
     if ($key == 'cout') {
         $post = "";
         $largeur = 65;
     }
     if ($key == 'preavis') {
         $post = " mois";
         $largeur = 70;
     }
     //description on autorise passage à la ligne
     if ($key == 'description') {
         $nowrap = "";