Alias.List.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {% extends 'base.html' %}
  2. {% block top %}
  3. <p>
  4. utente che sta effettuando gli aggiornamenti {{ utenteautorizzato.mail }}@{{ utenteautorizzato.domain.nome }}
  5. </p>
  6. {% if dominio %}
  7. <p>
  8. Dominio su cui si sta' lavorando: {{ dominio.nome }}
  9. </p>
  10. {% endif %}
  11. {% if alias %}
  12. <p>
  13. si stanno effettuando aggiornamenti su: {{ user.mail }}@{{ user.domain.nome }}
  14. </p>
  15. {% endif %}
  16. {% endblock %}
  17. {% block body %}
  18. <form name='newdomain' method='post'>
  19. {% csrf_token %}
  20. {% if not 'EDITALIASNEW' in securitlist %}
  21. <button class="btn btn-primary" type="submit" name='Nuovo alias' value="Nuovo alias">Nuovo Alias</button>
  22. {% endif %}
  23. </form>
  24. <table class='table table-striped table-hover'>
  25. <thead class='thead-dark'>
  26. <tr>
  27. <th scope='col'>#</th>
  28. <th scope='col'>MailFrom</th>
  29. <th scope='col'>MailTo</th>
  30. <th scope='col'>*</th>
  31. <th scope='col'>Attività</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. <form name="aliaslist" method="POST">
  36. {% csrf_token %}
  37. {% for u in aliaslist %}
  38. <tr>
  39. <th scope='row'>{{ u.id }}</th>
  40. <td> {{ u.mailfrom }} </td>
  41. <td> {{ u.mailto }} </td>
  42. <td>{% if u.enabled %}*{% else %}-{% endif %}</td>
  43. <td><button class="btn btn-primary" type="submit" name='edit' value="{{ u.id }}" {% if not u.enabled %} disabled {% endif %}>Edit</button>
  44. <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#ConfirmDisable{{ u.id }}" name='enabledisablebutton' value="{{ u.id }}" >
  45. {% if u.enabled %}Disabilita{% else %}Abilita{% endif %}</button>
  46. <button class="btn btn-primary" type='button' data-toggle='modal' data-target="#ConfirmDelete{{ u.id }}" name='deletebutton' value="{{ u.id }}" {% if not u.locked and u.enabled %} disabled {% endif %}>{% if u.tobedeleted %}Recupera{% else %}Cancella{% endif %}</button></td>
  47. </tr>
  48. <!-- Modal -->
  49. <div class="modal fade" id="ConfirmDisable{{ u.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  50. <div class="modal-dialog" role="document">
  51. <div class="modal-content">
  52. <div class="modal-header">
  53. <h5 class="modal fade" id="exampleModalLongTitle">Conferma Disattivazione</h5>
  54. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  55. <span aria-hidden="true">&times;</span>
  56. </button>
  57. </div>
  58. <div class="modal-body">
  59. {% if u.enabled %}
  60. Sei sicuro di voler disattivare questo Alias?
  61. {% else %}
  62. Vuoi riattivare questo Alias?
  63. {% endif %}
  64. </div>
  65. <div class="modal-footer">
  66. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  67. <button type="submit" class="btn btn-primary" name="enabledisablebutton" value="{{ u.id }}">Conferma</button>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!-- Modal -->
  73. <div class="modal fade" id="ConfirmDelete{{ u.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  74. <div class="modal-dialog" role="document">
  75. <div class="modal-content">
  76. <div class="modal-header">
  77. <h5 class="modal fade" id="exampleModalLongTitle">Impostare per la cancellazione?</h5>
  78. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  79. <span aria-hidden="true">&times;</span>
  80. </button>
  81. </div>
  82. <div class="modal-body">
  83. {% if u.tobedeleted %}
  84. Confermi che l'ALIAS venga recuperato?
  85. {% else %}
  86. Confermi che l'ALIAS venga impostato per la cancellazione?
  87. {% endif %}
  88. </div>
  89. <div class="modal-footer">
  90. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  91. <button type="submit" class="btn btn-primary" name="deletebutton" value="{{ u.id }}">Conferma</button>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. {% endfor %}
  97. </form>
  98. </tbody>
  99. {% endblock %}