2
0

cms.proweb-salaries-upload.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <link rel="stylesheet" href="css/dragAndDrop.css">
  2. <header class="d-flex flex-column flex-md-row align-items-md-center p-3 bg-light ">
  3. <h2 class="bd-title" id="content">
  4. <span>Base ProWeb : Importer un fichier Excel</span>
  5. </h2>
  6. </header>
  7. <?php
  8. echo core::filAriane(array(
  9. "current" => "Liste des salariés",
  10. "arbo" => array(
  11. "Proweb" => NULL,
  12. "Liste des salariés" => "/proweb-salaries.html",
  13. "Importer un fichier Excel (base Proweb)" => "/proweb-salaries-upload.html")
  14. ));
  15. ?>
  16. <br />
  17. <form action="/submit.php" method="post" enctype="multipart/form-data" onsubmit="loading()">
  18. <input type="hidden" name="from" value="proweb-import-salaries">
  19. <div class="form-group">
  20. <label>Datation des données</label>
  21. <input type="date" class="form-control" value="<?php echo date("Y-m-d") ?>" name="date" placeholder="" required>
  22. </div>
  23. <br />
  24. <div class="file-drop-area">
  25. <span class="choose-file-button">Choisissez votre fichier Excel (XLSX)</span>
  26. <span class="file-message">ou déposez le dans cette zone</span>
  27. <input id="proweb-import-salaries" class="import-excel" name="proweb-import-salaries" type="file" onchange="dargAndDrop()">
  28. </div>
  29. <br />
  30. <input class="btn btn-primary btn-lg" style="width: 100%" type="submit" value="Charger le fichier de la base ProWeb">
  31. </form>
  32. <script>
  33. function dargAndDrop(){
  34. var fileName = $("#proweb-import-salaries").val().split('\\').pop();
  35. $(".file-message").text($(".file-message").text().replace("ou déposez le dans cette zone", "Fichier prêt à être chargé : "+fileName));
  36. }
  37. </script>