Alias.List.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. <button class="btn btn-primary" type="submit" name="IndietroButton" value="IndietroButton">Indietro</button>
  24. </form>
  25. <table class='table table-striped table-hover'>
  26. <thead class='thead-dark'>
  27. <tr>
  28. <th scope='col'>#</th>
  29. <th scope='col'>MailFrom</th>
  30. <th scope='col'>MailTo</th>
  31. <th scope='col'>*</th>
  32. <th scope='col'>Attività</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <form name="aliaslist" method="POST">
  37. {% csrf_token %}
  38. {% for u in aliaslist %}
  39. <tr>
  40. <th scope='row'>{{ u.id }}</th>
  41. <td> {{ u.mailfrom }} </td>
  42. <td> {{ u.mailto }} </td>
  43. <td>{% if u.enabled %}*{% else %}-{% endif %}</td>
  44. <td><button class="btn btn-primary" type="submit" name='edit' value="{{ u.id }}" {% if not u.enabled %} disabled {% endif %}>Edit</button>
  45. <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#ConfirmDisable{{ u.id }}" name='enabledisablebutton' value="{{ u.id }}" >
  46. {% if u.enabled %}Disabilita{% else %}Abilita{% endif %}</button>
  47. <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>
  48. </tr>
  49. <!-- Modal -->
  50. <div class="modal fade" id="ConfirmDisable{{ u.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  51. <div class="modal-dialog" role="document">
  52. <div class="modal-content">
  53. <div class="modal-header">
  54. <h5 class="modal fade" id="exampleModalLongTitle">Conferma Disattivazione</h5>
  55. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  56. <span aria-hidden="true">&times;</span>
  57. </button>
  58. </div>
  59. <div class="modal-body">
  60. {% if u.enabled %}
  61. Sei sicuro di voler disattivare questo Alias?
  62. {% else %}
  63. Vuoi riattivare questo Alias?
  64. {% endif %}
  65. </div>
  66. <div class="modal-footer">
  67. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  68. <button type="submit" class="btn btn-primary" name="enabledisablebutton" value="{{ u.id }}">Conferma</button>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <!-- Modal -->
  74. <div class="modal fade" id="ConfirmDelete{{ u.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  75. <div class="modal-dialog" role="document">
  76. <div class="modal-content">
  77. <div class="modal-header">
  78. <h5 class="modal fade" id="exampleModalLongTitle">Impostare per la cancellazione?</h5>
  79. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  80. <span aria-hidden="true">&times;</span>
  81. </button>
  82. </div>
  83. <div class="modal-body">
  84. {% if u.tobedeleted %}
  85. Confermi che l'ALIAS venga recuperato?
  86. {% else %}
  87. Confermi che l'ALIAS venga impostato per la cancellazione?
  88. {% endif %}
  89. </div>
  90. <div class="modal-footer">
  91. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  92. <button type="submit" class="btn btn-primary" name="deletebutton" value="{{ u.id }}">Conferma</button>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. {% endfor %}
  98. </form>
  99. </tbody>
  100. {% endblock %}