cms.parametres-general.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. $checkMaintenance = core::isMaintenance();
  3. $checkDebug = core::isDebug();
  4. $checkLogSuccess = core::getConfig("LOG_SUCCESS");
  5. $checkLogWarning = core::getConfig("LOG_WARNING");
  6. $checkLogError = core::getConfig("LOG_ERROR");
  7. ?>
  8. <h4>Général</h4>
  9. <div class="element-parametres form-check form-switch">
  10. <input class="form-check-input" type="checkbox" role="switch" id="checkMaintenance" <?php core::checkboxSelecter($checkMaintenance) ?>>
  11. <label class="form-check-label" for="checkMaintenance">Site en mode maintenance (les salariés ne pourront plus faire d'action sur le site)</label>
  12. </div>
  13. <div class="element-parametres form-check form-switch">
  14. <input class="form-check-input" type="checkbox" role="switch" id="checkDebug" <?php core::checkboxSelecter($checkDebug) ?>>
  15. <label class="form-check-label" for="checkDebug">Afficher les erreurs (débug)</label>
  16. </div>
  17. <h4>Historique</h4>
  18. <div class="element-parametres form-check form-switch">
  19. <input class="form-check-input" type="checkbox" role="switch" id="checkLogSuccess" <?php core::checkboxSelecter($checkLogSuccess) ?>>
  20. <label class="form-check-label" for="checkLogSuccess">Historiser les actions réalisées avec succès</label>
  21. </div>
  22. <div class="element-parametres form-check form-switch">
  23. <input class="form-check-input" type="checkbox" role="switch" id="checkLogWarning" <?php core::checkboxSelecter($checkLogWarning) ?>>
  24. <label class="form-check-label" for="checkLogWarning">Historiser les actions réalisées avec warning</label>
  25. </div>
  26. <div class="element-parametres form-check form-switch">
  27. <input class="form-check-input" type="checkbox" role="switch" id="checkLogError" <?php core::checkboxSelecter($checkLogError) ?>>
  28. <label class="form-check-label" for="checkLogError">Historiser les actions en erreur</label>
  29. </div>
  30. <script>
  31. $(document).ready(function() {
  32. $('#checkMaintenance').on('change', function() {
  33. window.location.href = "/submit.php?from=parametres-maintenance-activation&actif=" + $("#checkMaintenance").prop('checked');
  34. });
  35. $('#checkDebug').on('change', function() {
  36. window.location.href = "/submit.php?from=parametres-debug-activation&actif=" + $("#checkDebug").prop('checked');
  37. });
  38. $('#checkLogSuccess').on('change', function() {
  39. window.location.href = "/submit.php?from=parametres-config&name=LOG_SUCCESS&value=" + $("#checkLogSuccess").prop('checked');
  40. });
  41. $('#checkLogWarning').on('change', function() {
  42. window.location.href = "/submit.php?from=parametres-config&name=LOG_WARNING&value=" + $("#checkLogWarning").prop('checked');
  43. });
  44. $('#checkLogError').on('change', function() {
  45. window.location.href = "/submit.php?from=parametres-config&name=LOG_ERROR&value=" + $("#checkLogError").prop('checked');
  46. });
  47. });
  48. </script>