2
0

events.login-salarie.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. if(ENVIRONNEMENT == "DEV"){
  3. $titleHead = "<span class=\"badge\" style=\"background-color:red;\">DEV</span>";
  4. } elseif(ENVIRONNEMENT == "R7"){
  5. $titleHead = "<span class=\"badge\" style=\"background-color:red;\">R7</span>";
  6. } elseif(ENVIRONNEMENT == "PREPROD"){
  7. $titleHead = "<span class=\"badge\" style=\"background-color:red;\">PREPROD</span>";
  8. } elseif(ENVIRONNEMENT == "PROD"){
  9. $titleHead = "";
  10. }
  11. if(debug::isFile("debug")){
  12. $titleDebug = "<span class=\"badge\" style=\"background-color:red; margin-top:5px;\">MODE DEBUG</span>";
  13. } else {
  14. $titleDebug = "";
  15. }
  16. ?>
  17. <main class="login">
  18. <div class="login-form">
  19. <img src="img/logo.png" alt="logo">
  20. <form id="formLogin">
  21. <?php echo "<div style=\"margin: -65px 0 0 2em; position: fixed;\">" . $titleHead . $titleDebug . "</div>"; ?>
  22. <div style="margin-bottom: -20px; display: none;" id="divAlerte"></div>
  23. <input type="hidden" id="from" name="from" value="login">
  24. <input type="hidden" id="event" name="event" value="<?php echo (core::ifGet("e")) ? core::getGet("e") : ""; ?>">
  25. <div>
  26. <label for="ident">Matricule ou identifiant</label>
  27. <input type="text" aria-label="Matricule ou identifiant" id="ident" value="" oninput="this.value = this.value.toUpperCase()" maxlength="8" name="ident" required>
  28. </div>
  29. <div>
  30. <label for="date">Date de naissance</label>
  31. <input type="date" pseudo="webkit-date-and-time-value" aria-label="Date d'ancienneté" id="date" value="" name="date" required>
  32. <input type="password" id="date_password" onchange="copyDate()" value="" name="password" style="display:none;">
  33. </div>
  34. <div>
  35. <button type="submit" id="submitLogin" onclick="saveDate()">Se connecter</button>
  36. </div>
  37. </form>
  38. <div>
  39. <script src="js/login-salarie.js"></script>
  40. </main>
  41. <script>
  42. function saveDate(){
  43. date = $('#date').val();
  44. $('#date_password').val(date);
  45. }
  46. function copyDate(){
  47. date = $('#date_password').val();
  48. $('#date').val(date);
  49. }
  50. </script>