Filtro.List.html 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {% extends 'base.html' %}
  2. {% block top %}
  3. <p>
  4. utente che sta effettuando gli aggiornamenti {{ utenteautorizzato.mail }}@{{ utenteautorizzato.domain.nome }}
  5. </p>
  6. {% endblock %}
  7. {% block body %}
  8. <form name='newfiltro' method='post'>
  9. {% csrf_token %}
  10. <button class="btn btn-primary" type="submit" name='Nuovo Filtro' value="Nuovo Filtro">Nuovo Filtro</button>
  11. </form>
  12. <table class='table'>
  13. <thead>
  14. <tr>
  15. <th scope='col'>Filtro</th>
  16. <th scope='col'>Status</th>
  17. <th scope='col'>Rcpt</th>
  18. <th scope='col'>Redirect</th>
  19. <th scope='col'>I</th>
  20. <th scope='col'>O</th>
  21. <th scope='col'>H</th>
  22. <th scope='col'>B</th>
  23. <th scope='col'>*</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. <form name="filtrolist" method="POST">
  28. {% csrf_token %}
  29. {% for f in filtro %}
  30. <tr>
  31. <th scope='row'>{{ f.filtro }}</th>
  32. <td> {{ f.status }} </td>
  33. <td> {{ f.destination }} </td>
  34. <td> {{ f.redirect }} </td>
  35. <td>{% if f.dinput %}*{% else %}-{% endif %}</td>
  36. <td>{% if f.doutput %}*{% else %}-{% endif %}</td>
  37. <td>{% if f.header %}*{% else %}-{% endif %}</td>
  38. <td>{% if f.body %}*{% else %}-{% endif %}</td>
  39. <td>{% if f.enabled %}*{% else %}-{% endif %}</td>
  40. <td><button class="btn btn-primary" type="submit" name='edit' value="{{ f.id }}">Edit</button>
  41. <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#ConfirmDisable{{ f.id }}" name='disable' value="{{ f.id }}" {% if not f.enabled %} disabled {% endif %}>Disabilita</button>
  42. <button class="btn btn-primary" type="submit" name='enable' value="{{ f.id }}" {% if f.enabled %} disabled {% endif %}>Abilita</button>
  43. <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#ConfirmDelete{{ f.id }}" name='delete' value="{{ f.id }}" {% if not f.enabled %} disabled {% endif %}>Cancella</button></td>
  44. </tr>
  45. <!-- Modal -->
  46. <div class="modal fade" id="ConfirmDisable{{ f.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  47. <div class="modal-dialog" role="document">
  48. <div class="modal-content">
  49. <div class="modal-header">
  50. <h5 class="modal fade" id="exampleModalLongTitle">Conferma Disattivazione</h5>
  51. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  52. <span aria-hidden="true">&times;</span>
  53. </button>
  54. </div>
  55. <div class="modal-body">
  56. Sei sicuro di voler disattivare questo Filtro?
  57. </div>
  58. <div class="modal-footer">
  59. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  60. <button type="submit" class="btn btn-primary" name="disable" value="{{ f.id }}">Conferma</button>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- Modal -->
  66. <div class="modal fade" id="ConfirmDelete{{ f.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  67. <div class="modal-dialog" role="document">
  68. <div class="modal-content">
  69. <div class="modal-header">
  70. <h5 class="modal fade" id="exampleModalLongTitle">Conferma cancellazione</h5>
  71. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  72. <span aria-hidden="true">&times;</span>
  73. </button>
  74. </div>
  75. <div class="modal-body">
  76. Sei sicuro di voler Cancellare Questa Regola?
  77. </div>
  78. <div class="modal-footer">
  79. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  80. <button type="submit" class="btn btn-primary" name="delete" value="{{ f.id }}">Conferma</button>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. {% endfor %}
  86. </form>
  87. </tbody>
  88. {% endblock %}