amministratore.edit.AZP.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {% extends 'base.html' %}
  2. {% block body %}
  3. <div class="error">
  4. <!-- errori form sede -->
  5. {% if azienda.errors %}
  6. <div class="alert alert-danger">
  7. {{ azienda.errors }}
  8. </div>
  9. {% endif %}
  10. <!-- fine zona errori -->
  11. </div>
  12. <div class="h4">
  13. Lista Permessi assegnati per societa'.
  14. </div>
  15. <div class="h5">
  16. Questa lista contiene i permessi assegnati a livello di amministratore.
  17. </div>
  18. <div class="h5">
  19. Assegnare i permessi a questo livello <b>supera</b> eventuali permessi assegnati a livello azienda o sede.
  20. </div>
  21. <ul class="list-group list-group-flush">
  22. <li class="list-group-item">
  23. <table class='table table-striped table-hover'>
  24. <thead class='thead-dark'>
  25. <tr>
  26. <th scope='col'>Nome</th>
  27. <th scope='col'>Descrizione</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. {% for a in permessoAMP %}
  32. <tr>
  33. <td> {{ a.nome }} </td>
  34. <td> {{ a.descrizione }} </td>
  35. </tr>
  36. {% endfor %}
  37. </tbody>
  38. </table>
  39. </li>
  40. </ul>
  41. <form name='amministratorepermessiform' method='POST'>
  42. {% csrf_token %}
  43. <ul class="list-group list-group-flush">
  44. <li class="list-group-item">
  45. <table class='table table-striped table-hover'>
  46. <thead class='thead-dark'>
  47. <tr>
  48. <th scope='col'>Nome</th>
  49. <th scope='col'>Descrizione</th>
  50. <th scope='col'>D</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. {% for a in permessoAZP %}
  55. <tr>
  56. <td> {{ a.nome }} </td>
  57. <td> {{ a.descrizione }} </td>
  58. <td><button type='button' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#ConfirmDeleteModal{{ a.id }}' value='{{ a.id }}'>D</button></td>
  59. </tr>
  60. <!-- Modal -->
  61. <div class="modal fade" id="ConfirmDeleteModal{{ a.id }}" tabindex="-1" role="dialog" aria-labelledby="ConfirmDeleteLabel{{ a.id }}" aria-hidden="true">
  62. <div class="modal-dialog" role="document">
  63. <div class="modal-content">
  64. <div class="modal-header">
  65. <h5 class="modal-title" id="ConfirmDeleteLabel">Conferma Cancellazione Diritti</h5>
  66. <span aria-hidden="true"></span>
  67. </button>
  68. </div>
  69. <div class="modal-body">
  70. Confermando si procede all'immediata rimozione del permesso indicato?
  71. </div>
  72. <div class="modal-footer">
  73. {% csrf_token %}
  74. <button type="submit" name="ConfermaCancellazionePermesso" value='{{ a.id }}' class="btn btn-primary">Cancella Permesso</button>
  75. <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
  76. </div>
  77. </div>
  78. </div>
  79. <!-- end modal -->
  80. {% endfor %}
  81. <tr>
  82. {% csrf_token %}
  83. <td>
  84. <select class="form-select" name="ListaPermessiDaAggiungere" id="ListaPermessiDaAggiungere">
  85. <option value="">-- Scegli il permesso da Aggiungere --</option>
  86. {% for lp in listapermessiassegnabili %}
  87. <option value="{{ lp.id }}">{{ lp.nome }}</option>
  88. {% endfor %}
  89. </select>
  90. </td>
  91. <td>
  92. <button type='submit' name="PermessoDaAggiungereButton" class='btn btn-primary'>Aggiungi</button>
  93. </td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. </li>
  98. </ul>
  99. <div class="btn-group">
  100. <input type='submit' name="AmministratoreButton" class="btn btn-primary" value="Torna a profilo Amministratore">
  101. <input type='submit' name="AmministratoreReturnButton" class="btn btn-primary" value="Ritorna">
  102. <div>
  103. </form>
  104. {% endblock %}