| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- {% extends 'base.html' %}
- {% block body %}
- <div class="error">
- <!-- errori form sede -->
- {% if sede.errors %}
- <div class="alert alert-danger">
- {{ sede.errors }}
- </div>
- {% endif %}
- <!-- fine zona errori -->
- </div>
- <div">
- Lista Zone Autorizzate
- </div>
- <ul class="list-group list-group-flush">
- <li class="list-group-item">
- <table class='table table-striped table-hover'>
- <thead class='thead-dark'>
- <tr>
- <th scope='col'>Nome</th>
- <th scope='col'>Identificativo</th>
- <th scope='col'>ES</th>
- <th scope='col'>D</th>
- </tr>
- </thead>
- <tbody>
- {% for a in listasede %}
- <tr>
- <td> {{ a.nome }} </td>
- <td> {{ a.identificativo }} </td>
- <td><button type='submit' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#SedeConfirmUpdateModal{{ a.id }}' value='{{ a.id }}'>E</button></td>
- <td><button type='submit' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#SedeConfirmDeleteModal{{ a.id }}' value='{{ a.id }}'>D</button></td>
- </tr>
- <!-- Modal -->
- <div class="modal fade" id="SedeConfirmUpdateModal{{ a.id }}" tabindex="-1" role="dialog" aria-labelledby="SedeConfirmUpdateLabel{{ a.id }}" aria-hidden="true">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="SedeConfirmUpdateLabel">Aggiornamento Diritti Amministratore</h5>
- <span aria-hidden="true"></span>
- </div>
- <div class="modal-body">
- <select class="form-select" multiple aria-label="Selezione Multipla Permessi" >
- {% for lp in listapermesso %}
- <option value={{ lp.permesso.id }}>{{ lp.permesso.nome }} - {{ lp.descrizione }}</option>
- {% endfor %}
- </select>
- </div>
- <div class="modal-footer">
- <form name="SedeUpdatePermessoForm" method="POST">
- {% csrf_token %}
- <button type="submit" name="SedeUpdatePermesso" value='{{ a.id }}' class="btn btn-primary">Aggiorna Permessi</button>
- <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <!-- end modal -->
- <!-- Modal -->
- <div class="modal fade" id="SedeConfirmDeleteModal{{ a.id }}" tabindex="-1" role="dialog" aria-labelledby="SedeConfirmDeleteLabel{{ a.id }}" aria-hidden="true">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="SedeConfirmDeleteLabel">Conferma Cancellazione Diritti</h5>
- <span aria-hidden="true"></span>
- </div>
- <div class="modal-body">
- Confermando si procede all'immediata rimozione dei permessi associati alla
- societa' {{ a.nome }} e alle sue sedi.
- Confermi la cancellazione dei diritti di accesso di {{ a.nome }}?
- </div>
- <div class="modal-footer">
- <form name='SedeConfirmDeleteModal' method='POST'>
- {% csrf_token %}
- <button type="submit" name="SedeConfermaCancellazionePermesso" value='{{ a.id }}' class="btn btn-primary">Cancella Permessi</button>
- <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <!-- end modal -->
- {% endfor %}
- <tr>
- <form name='sededaaggiungereform' method='POST'>
- {% csrf_token %}
- <td>
- <select class="form-select" multiple name="ListaSedeMancanteSelect" id="listasedemancante">
- {% for lp in listasedediff %}
- <option value="{{ lp.id }}">{{ lp.nome }} - {{ lp.identificativo}}</option>
- {% endfor %}
- </select>
- </td>
- <td>
- <button type='submit' name="SedeDaAggiungereButton" class='btn btn-primary'>Aggiungi</button>
- </td>
- </form>
- </tr>
- </tbody>
- </table>
- </li>
- </ul>
- <div class="btn-group">
- <br>
- <input type='submit' name="AmministratoreUpdateButton" class="btn btn-primary" value='Aggiorna'>
- {# ordine: azienda, sede, amministratore #}
- <input type='submit' name="AmministratoreDirittiAziendaButton" class="btn btn-primary" value="Avanti">
- <input type='submit' class="btn btn-primary" name="indietro" value="Indietro">
- </div>
- {% end block %}
|