amministratore.edit.AZ.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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>
  13. Lista Aziende Autorizzate
  14. </div>
  15. <div class='h4'>
  16. Questa lista contiene le aziende a cui l'amministratore è autorizzato ad accedere. L'accesso è concesso in prima battuta solo in lettura.
  17. usare il tasto "E" per consentire anche altre operazioni.
  18. </div>
  19. <form name='aziendapermessiform' method='POST'>
  20. {% csrf_token %}
  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'>P.Iva</th>
  28. <th scope='col'>P</th>
  29. <th scope='col'>S</th>
  30. <th scope='col'>D</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. {% for a in listaazienda %}
  35. <tr>
  36. <td> {{ a.nome }} </td>
  37. <td> {{ a.partitaiva }} </td>
  38. <td><button type='submit' class='btn btn-primary' name="PermessoButton" value='{{ a.id }}'>P</button></td>
  39. <td><button type='submit' class='btn btn-primary' name="SedeButton" value='{{ a.id }}'>S</button></td>
  40. <td><button type='button' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#ConfirmDeleteModal{{ a.id }}' value='{{ a.id }}'>D</button></td>
  41. </tr>
  42. <!-- Modal -->
  43. <div class="modal fade" id="ConfirmDeleteModal{{ a.id }}" tabindex="-1" role="dialog" aria-labelledby="ConfirmDeleteLabel{{ a.id }}" aria-hidden="true">
  44. <div class="modal-dialog" role="document">
  45. <div class="modal-content">
  46. <div class="modal-header">
  47. <h5 class="modal-title" id="ConfirmDeleteLabel">Conferma Cancellazione Diritti</h5>
  48. <span aria-hidden="true"></span>
  49. </button>
  50. </div>
  51. <div class="modal-body">
  52. Confermando si procede all'immediata rimozione dei permessi associati alla
  53. societa' {{ a.nome }} e alle sue sedi.
  54. Confermi la cancellazione dei diritti di accesso di {{ a.nome }}?
  55. </div>
  56. <div class="modal-footer">
  57. {% csrf_token %}
  58. <button type="submit" name="ConfermaCancellazioneAzienda" value='{{ a.id }}' class="btn btn-primary">Cancella Permessi</button>
  59. <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
  60. </div>
  61. </div>
  62. </div>
  63. <!-- end modal -->
  64. {% endfor %}
  65. <tr>
  66. {% csrf_token %}
  67. <td>
  68. <select class="form-select" name="ListaAziendaDaAggiungere" id="ListaAziendaDaAggiungere">
  69. <option value="">-- Scegli l'azienda da Aggiungere --</option>
  70. {% for lp in listaaziendadiff %}
  71. <option value="{{ lp.id }}">{{ lp.nome }} - {{ lp.partitaiva}}</option>
  72. {% endfor %}
  73. </select>
  74. </td>
  75. <td>
  76. <button type='submit' name="AziendaDaAggiungereButton" class='btn btn-primary'>Aggiungi</button>
  77. </td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. </li>
  82. </ul>
  83. <div class="btn-group">
  84. <input type='submit' name="AmministratoreButton" class="btn btn-primary" value="Torna a profilo Amministratore">
  85. <input type='submit' name="AmministratoreReturnButton" class="btn btn-primary" value="Ritorna">
  86. <div>
  87. </form>
  88. {% endblock %}