cms.parametres-teams-edit.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <header class="d-flex flex-column flex-md-row align-items-md-center p-3 bg-light ">
  2. <h2 class="bd-title" id="content">
  3. <span>Administration : Modification des Groupes & Droits</span>
  4. </h2>
  5. </header>
  6. <?php
  7. echo core::filAriane(array(
  8. "current" => "Modification",
  9. "arbo" => array(
  10. "Administration" => NULL,
  11. "Groupes & Droits" => "/parametres-teams.html",
  12. "Modification" => "/parametres-teams-edit.html"
  13. )
  14. ));
  15. ?>
  16. <form method="post" action="/submit.php">
  17. <input type="hidden" name="from" value="parametres-teams-edit">
  18. <div>
  19. <table id="table-edit" class="table-striped table-hover table-sm table table-bordered" width="100%">
  20. <thead>
  21. <tr>
  22. <th>Accès</th>
  23. <th width="180">Administrateur</th>
  24. <th width="180">Bureau du CSE</th>
  25. <th width="180">Elu du CSE</th>
  26. <th width="180">Comptable</th>
  27. <th width="180">Modérateur du CMS</th>
  28. <th width="180">Assistance sociale</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <?php
  33. $access = access::finalCompletAccess();
  34. foreach ($access as $valueAccess) {
  35. access::printRenderAccessRow($valueAccess);
  36. }
  37. ?>
  38. </tbody>
  39. </table>
  40. </div>
  41. <input class="btn btn-primary btn-lg" style="width: 100%" type="submit" value="Modifier les droits">
  42. </form>
  43. <script>
  44. document.querySelectorAll('.form-select').forEach(function(select) {
  45. function updateBg() {
  46. switch (select.value) {
  47. case '1':
  48. select.style.backgroundColor = '#d4edda';
  49. break;
  50. case '0':
  51. select.style.backgroundColor = '#f8d7da';
  52. break;
  53. case '2':
  54. select.style.backgroundColor = '#ffeeba';
  55. break;
  56. default:
  57. select.style.backgroundColor = '';
  58. }
  59. }
  60. select.addEventListener('change', updateBg);
  61. updateBg();
  62. });
  63. </script>