gestioneContattiList.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {% extends 'base.html' %}
  2. {% block top %}
  3. <p>
  4. Utente che sta effettuando le operazioni: {{ utenteautorizzato.mail }}@{{ utenteautorizzato.domain.nome }}
  5. </p>
  6. {% endblock %}
  7. {% block body %}
  8. <form name='newcontact' method='post'>
  9. {% csrf_token %}
  10. <button class="btn btn-primary" type="submit" name='Nuovo Contatto' value="Nuovo Contatto">Nuovo Contatto</button>
  11. </form>
  12. <table class='table'>
  13. <thead>
  14. <tr>
  15. <th scope='col'>#</th>
  16. <th scope='col'>nome</th>
  17. <th scope='col'>*</th>
  18. <th scope='col'>Operazioni</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <form name="contattilist" method="POST">
  23. {% csrf_token %}
  24. {% for u in contatti %}
  25. <tr>
  26. <th scope='row'>{{ u.id }}</th>
  27. <td> {{ u.nome }}<br>({{ u.dominicontatore }}: {% for i in u.dominilista %}{{ i.domini.domain }} {% endfor %})</td>
  28. <td>{% if u.enabled %}*{% else %}-{% endif %}</td>
  29. <td><button class="btn btn-primary" type="submit" name='edit' value='{{ u.id }}'>Edit</button>
  30. <button class="btn btn-primary" type="submit" name='{% if u.enabled %}disable{% else %}enable{% endif %}' value='{{ u.id }}'>
  31. {% if u.enabled %}Disabilita{% else %}Abilita{% endif %}</button></td>
  32. </tr>
  33. {% endfor %}
  34. </form>
  35. </tbody>
  36. {% endblock %}