Causali.Edit.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. <div>
  9. <div class='row'>
  10. {% if formcausale.errors %}
  11. <p>Rilevati Errori, impossibile proseguire.</p>
  12. {% for f in formcausale %}
  13. {% for e in f.errors %}
  14. <div class="alter alter-danger">
  15. <strong>{{f.label|escape }}: {{ e|escape }}</strong>
  16. </div>
  17. {% endfor %}
  18. {% endfor %}
  19. {% for e in formcausale.non_field_errors %}
  20. <div class="alter alter-danger">
  21. <strong>{{ e|escape }}</strong>
  22. </div>
  23. {% endfor %}
  24. {% endif %}
  25. </div>
  26. </div>
  27. <form name='FormCausale' method='post'>
  28. {% csrf_token %}
  29. <div class='form-inline'>
  30. <div class='form-group mb-2'>
  31. <label for='nome'>Nome Causale</label>
  32. <input type='text' class='form-control' id='nome' name='nome' placeholder='causale' value='{{ formcausale.nome.value }}'>
  33. </div>
  34. <div class='form-check-inline form-group mb-3'>
  35. <label for='enabled' class='form-check-label'>Abilitato</label>
  36. <input type='checkbox' class='form-check-input' id='enabled' name='enabled' {% if formcausale.enabled.value %} checked {% endif %}>
  37. </div>
  38. <div class='form-group mb-4'>
  39. <label for='valore'>Valore</label>
  40. <input type='integer' class='form-control' id='valore' name='valore' value='{{ formcausale.valore.value }}'>
  41. <label for='ordine'>Ordine</label>
  42. <input type='integer' class='form-control' id='ordine' name='ordine' value='{{ formcausale.ordine.value }}'>
  43. </div>
  44. </div>
  45. <div class='form-group mb-4'>
  46. <label for 'domain_service'>Servizio Associato</label>
  47. <select class='form-select' id='domain_service' name='domain_service'>
  48. <option value="0">-- -- --</option>
  49. {% for i in servizi %}
  50. <option value="{{ i.id }}" {% if i.id|stringformat:'s' == formcausale.domain_service.value|stringformat:'s' %} selected {% endif %}>{{ i.id }} - {{ i.nome }}</option>
  51. {% endfor %}
  52. </select>
  53. </div>
  54. <hr>
  55. <div class='input-group my-2'> <!-- sezione invio mail all'utente -->
  56. <label for='send_email_user' class='form-check-label pe-2'>Invia la mail al/agli utenti registrati per il dominio</label>
  57. <input type='checkbox' class='form-check-input' id='send_email_user' name='send_email_user' {% if formcausale.send_email_user.value %}checked{% endif %}>
  58. <label for='template' class='form-select-label px-2'>Template: </label>
  59. <select class='form-select' id='template' name='template'>
  60. <option value="0">-- -- --</option>
  61. {% for i in template %}
  62. <option value="{{ i.id }}" {% if i.id|stringformat:'s' == formcausale.template.value|stringformat:'s' %} selected {% endif %}>{{ i.id }} - {{ i.nome }}</option>
  63. {% endfor %}
  64. </select>
  65. </div>
  66. <div class='input-group my-2'> <!-- sezione invia la mail al/agli amministratori del pannello -->
  67. <label for='send_email_admin' class='form-check-label pe-2'>Invia Mail Agli Amministratori</LAbel>
  68. <input type='checkbox' class='form-check-input' id='send_email_admin' name='send_email_admin' {% if formcausale.send_email_admin.value %} checked {% endif %}>
  69. <label for='send_email_user' class='form-label px-2'>Mail Amministratori:</label>
  70. <input type='text' class='form-control' id='to_admin' name='to_admin' value='{{ formcausale.to_admin.value }}'></input>
  71. <label for='template' class='form-select-label px-2'>Template: </label>
  72. <select class='form-select' id='template_admin' name='template_admin'>
  73. <option value="0">-- -- --</option>
  74. {% for i in template %}
  75. <option value="{{ i.id }}" {% if i.id|stringformat:'s' == formcausale.template_admin.value|stringformat:'s' %} selected {% endif %}>{{ i.id }} - {{ i.nome }}</option>
  76. {% endfor %}
  77. </select>
  78. </div>
  79. <div class='input-group'> <!-- sezione invia la mail alla contabilita' -->
  80. <label for='send_email_account' class='form-check-label pe-2'>Invia Mail Contabilita'</label>
  81. <input type='checkbox' class='form-check-input' id='send_email_account' name='send_email_account' {% if formcausale.send_email_account.value %} checked {% endif %}>
  82. <label for='to_account' class='form-label px-2'>Mail Contabilita':</label>
  83. <input type='text' class='form-control' id='to_account' name='to_account' value='{{ formcausale.to_account.value }}'></input>
  84. <label for='template' class='form-select-label px-2'>Template: </label>
  85. <select class='form-select' id='template_account' name='template_account'>
  86. <option value="0">-- -- --</option>
  87. {% for i in template %}
  88. <option value="{{ i.id }}" {% if i.id|stringformat:'s' == formcausale.template_account.value|stringformat:'s' %} selected {% endif %}>{{ i.id }} - {{ i.nome }}</option>
  89. {% endfor %}
  90. </select>
  91. </div>
  92. <div class='input-group my-2'> <!-- invio mail eventualmente ad altri account -->
  93. <label for='send_email_other' class='form-check-label pe-2'>Invia Mail ad Altri</label>
  94. <input type='checkbox' class='form-check-input' id='send_email_other' name='send_email_other' {% if formcausale.send_email_other.value %} checked {% endif %}>
  95. <label for='to_account' class='form-label px-2'>Mail Esterne:</label>
  96. <input type='text' class='form-control' id='to_other' name='to_other' value='{{ formcausale.to_other.value }}'></input>
  97. <label for='template' class='form-select-label px-2'>Template: </label>
  98. <select class='form-select' id='template_other' name='template_other'>
  99. <option value="0">-- -- --</option>
  100. {% for i in template %}
  101. <option value="{{ i.id }}" {% if i.id|stringformat:'s' == formcausale.template_other.value|stringformat:'s' %} selected {% endif %}>{{ i.id }} - {{ i.nome }}</option>
  102. {% endfor %}
  103. </select>
  104. </div>
  105. <div class='input-group'>
  106. <label for='from_email' class='form-input-label pe-2'>Mittente email:</label>
  107. <input type='text' class='form-control' id='from_email' name='from_email' value='{{ formcausale.from_email.value }}'></input>
  108. </div>
  109. <hr>
  110. <div class='row'>
  111. Servizi Associati:
  112. </div>
  113. <div class='form-group'>
  114. <label for='date_expire_contract' class='form-check-label'>Data Scadenza Contratto: </label>
  115. <input type='checkbox' class='form-check-input' id='date_expire_contract' name='date_expire_contract' {% if formcausale.date_expire_contract.value %} checked {% endif %}
  116. </div>
  117. <div class='form-group'>
  118. <label for='date_expire_registrar' class='form-check-label'>Data Scadenza Presso il Registrar: </label>
  119. <input type='checkbox' class='form-check-input' id='date_expire_registrar' name='date_expire_registrar' {% if formcausale.date_expire_registrar.value %} checked {% endif %}
  120. </div>
  121. <div class='form-group'>
  122. <label for='check_registrar' class='form-check-label'>Verifica Registrar: </label>
  123. <input type='checkbox' class='form-check-input' id='check_registrar' name='check_registrar' {% if formcausale.check_registrar.value %} checked {% endif %}
  124. </div>
  125. <div class='form-group'>
  126. <label for='domain_tobedeleted' class='form-check-label'>Dominio da Cancellare Fisicamente: </label>
  127. <input type='checkbox' class='form-check-input' id='domain_tobedeleted' name='domain_tobedeleted' {% if formcausale.domain_tobedeleted %}checked{% endif %}>
  128. </div>
  129. <hr>
  130. <div class='btn-group' role='group' aria-label='conferme'>
  131. <button type='submit' class='btn btn-primary'>Conferma</button>
  132. <button type='reset' class='btn btn-secondary'>Reset</button>
  133. <button type='submit' class='btn btn-secondary' name="Ritorno">Ritorno (Senza salvare)</button>
  134. </div>
  135. </form>
  136. {% endblock %}
  137. template = models.IntegerField(db_column='template')
  138. ##template_subject = models.CharField(db_column='template_subject',max_length=128)
  139. #template_txt = models.CharField(db_column='template_txt',max_length=128)
  140. #template_html = models.CharField(db_column='template_html',max_length=128)
  141. #template_sms = models.CharField(db_column='template_sms',max_length=128)
  142. renew_request = models.BooleanField(db_column='renew_request')
  143. renew_authorized = models.BooleanField(db_column='renew_authorized')
  144. close_request = models.BooleanField(db_column='close_request')
  145. domain_opened = models.BooleanField(db_column='domain_opened')
  146. domain_closed = models.BooleanField(db_column='domain_closed')
  147. domain_suspended = models.BooleanField(db_column='domain_suspended')
  148. domain_enabled = models.BooleanField(db_column='domain_enabled')
  149. domain_tobedeleted = models.BooleanField(db_column='domain_tobedelete')
  150. transferring_in = models.BooleanField(db_column='transferring_in')
  151. transferring_out = models.BooleanField(db_column='transferring_out')
  152. transferred_in_complete = models.BooleanField(db_column='transferred_in_complete')
  153. transferred_out_complete = models.BooleanField(db_column='transferred_out_complete')
  154. domain_service = models.ForeignKey('Service',db_column='domain_service',on_delete=models.PROTECT)
  155. domain_service_active = models.BooleanField(db_column='domain_service_active')
  156. domain_expired = models.BooleanField(db_column='domain_expired')
  157. mail_opened = models.BooleanField(db_column='mail_opened')
  158. mail_closed = models.BooleanField(db_column='mail_closed')
  159. mail_tobedeleted = models.BooleanField(db_column='mail_tobedeleted')
  160. mail_password= models.BooleanField(db_column='mail_password')
  161. mail_resend = models.BooleanField(db_column='mail_resend')
  162. mail_test = models.BooleanField(db_column='mail_test')
  163. payment_ok = models.BooleanField(db_column='payment_ok')
  164. payment_ko = models.BooleanField(db_column='payment_ko')
  165. ordine = models.IntegerField(db_column='ordine')
  166. template = models.ForeignKey("template.Template",db_column="template",on_delete=models.PROTECT)
  167. renew_code = models.BooleanField(db_column='renew_code',default=0)
  168. erase = models.BooleanField(db_column='erase',default=0)
  169. automatico = models.BooleanField(db_column='automatico',default=0)