amministratore.edit.pse.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. {% extends 'base.html' %}
  2. {% block body %}
  3. <div class="error">
  4. <!-- errori form sede -->
  5. {% if sede.errors %}
  6. <div class="alert alert-danger">
  7. {{ sede.errors }}
  8. </div>
  9. {% endif %}
  10. <!-- fine zona errori -->
  11. </div>
  12. <div">
  13. Lista Zone Autorizzate
  14. </div>
  15. <ul class="list-group list-group-flush">
  16. <li class="list-group-item">
  17. <table class='table table-striped table-hover'>
  18. <thead class='thead-dark'>
  19. <tr>
  20. <th scope='col'>Nome</th>
  21. <th scope='col'>Identificativo</th>
  22. <th scope='col'>ES</th>
  23. <th scope='col'>D</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. {% for a in listasede %}
  28. <tr>
  29. <td> {{ a.nome }} </td>
  30. <td> {{ a.identificativo }} </td>
  31. <td><button type='submit' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#SedeConfirmUpdateModal{{ a.id }}' value='{{ a.id }}'>E</button></td>
  32. <td><button type='submit' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#SedeConfirmDeleteModal{{ a.id }}' value='{{ a.id }}'>D</button></td>
  33. </tr>
  34. <!-- Modal -->
  35. <div class="modal fade" id="SedeConfirmUpdateModal{{ a.id }}" tabindex="-1" role="dialog" aria-labelledby="SedeConfirmUpdateLabel{{ a.id }}" aria-hidden="true">
  36. <div class="modal-dialog" role="document">
  37. <div class="modal-content">
  38. <div class="modal-header">
  39. <h5 class="modal-title" id="SedeConfirmUpdateLabel">Aggiornamento Diritti Amministratore</h5>
  40. <span aria-hidden="true"></span>
  41. </div>
  42. <div class="modal-body">
  43. <select class="form-select" multiple aria-label="Selezione Multipla Permessi" >
  44. {% for lp in listapermesso %}
  45. <option value={{ lp.permesso.id }}>{{ lp.permesso.nome }} - {{ lp.descrizione }}</option>
  46. {% endfor %}
  47. </select>
  48. </div>
  49. <div class="modal-footer">
  50. <form name="SedeUpdatePermessoForm" method="POST">
  51. {% csrf_token %}
  52. <button type="submit" name="SedeUpdatePermesso" value='{{ a.id }}' class="btn btn-primary">Aggiorna Permessi</button>
  53. <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
  54. </form>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- end modal -->
  60. <!-- Modal -->
  61. <div class="modal fade" id="SedeConfirmDeleteModal{{ a.id }}" tabindex="-1" role="dialog" aria-labelledby="SedeConfirmDeleteLabel{{ 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="SedeConfirmDeleteLabel">Conferma Cancellazione Diritti</h5>
  66. <span aria-hidden="true"></span>
  67. </div>
  68. <div class="modal-body">
  69. Confermando si procede all'immediata rimozione dei permessi associati alla
  70. societa' {{ a.nome }} e alle sue sedi.
  71. Confermi la cancellazione dei diritti di accesso di {{ a.nome }}?
  72. </div>
  73. <div class="modal-footer">
  74. <form name='SedeConfirmDeleteModal' method='POST'>
  75. {% csrf_token %}
  76. <button type="submit" name="SedeConfermaCancellazionePermesso" value='{{ a.id }}' class="btn btn-primary">Cancella Permessi</button>
  77. <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
  78. </form>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <!-- end modal -->
  84. {% endfor %}
  85. <tr>
  86. <form name='sededaaggiungereform' method='POST'>
  87. {% csrf_token %}
  88. <td>
  89. <select class="form-select" multiple name="ListaSedeMancanteSelect" id="listasedemancante">
  90. {% for lp in listasedediff %}
  91. <option value="{{ lp.id }}">{{ lp.nome }} - {{ lp.identificativo}}</option>
  92. {% endfor %}
  93. </select>
  94. </td>
  95. <td>
  96. <button type='submit' name="SedeDaAggiungereButton" class='btn btn-primary'>Aggiungi</button>
  97. </td>
  98. </form>
  99. </tr>
  100. </tbody>
  101. </table>
  102. </li>
  103. </ul>
  104. <div class="btn-group">
  105. <br>
  106. <input type='submit' name="AmministratoreUpdateButton" class="btn btn-primary" value='Aggiorna'>
  107. {# ordine: azienda, sede, amministratore #}
  108. <input type='submit' name="AmministratoreDirittiAziendaButton" class="btn btn-primary" value="Avanti">
  109. <input type='submit' class="btn btn-primary" name="indietro" value="Indietro">
  110. </div>
  111. {% end block %}