2
0

cms.host-parametres.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. $checkMaintenance = core::isMaintenance();
  3. $checkDebug = core::isDebug();
  4. ?>
  5. <header class="d-flex flex-column flex-md-row align-items-md-center p-3 bg-light ">
  6. <h2 class="bd-title" id="content">
  7. <span>Paramètres</span>
  8. </h2>
  9. </header>
  10. <?php
  11. echo core::filAriane(array(
  12. "current" => "Paramètres",
  13. "arbo" => array(
  14. "Maintenance" => NULL,
  15. "Paramètres" => "/host-parametres.html"
  16. )
  17. ));
  18. ?>
  19. <h4>Général</h4>
  20. <div class="form-check form-switch">
  21. <input class="form-check-input" type="checkbox" role="switch" id="checkMaintenance" <?php core::checkboxSelecter($checkMaintenance) ?>>
  22. <label class="form-check-label" for="checkMaintenance">Site en mode maintenance (les salariés ne pourront plus faire d'action sur le site)</label>
  23. </div>
  24. <div class="form-check form-switch">
  25. <input class="form-check-input" type="checkbox" role="switch" id="checkDebug" <?php core::checkboxSelecter($checkDebug) ?>>
  26. <label class="form-check-label" for="checkDebug">Afficher les erreurs (débug)</label>
  27. </div>
  28. <script>
  29. $(document).ready(function() {
  30. $('#checkMaintenance').on('change', function() {
  31. window.location.href = "/submit.php?from=dev-maintenance-activation&actif=" + $("#checkMaintenance").prop('checked');
  32. });
  33. $('#checkDebug').on('change', function() {
  34. window.location.href = "/submit.php?from=dev-debug-activation&actif=" + $("#checkDebug").prop('checked');
  35. });
  36. });
  37. </script>