{% extends 'base.html' %}

{% block body %}
<div>Informazioni Generali sul Servizio</div>
<div></div>

  <div class='row'>
    <div class='col'>
      <label for='domain'>Dominio</label>
      <input type='text' class='form-control' id='domain' value='{{dominio.nome }}' readonly>
    </div>

    <div class='col'>
      <label for='public_email'>Email Pubblica</label>
      <input type='text' class='form-control' id='public_email' value='{{ dominio.public_email }}' readonly>
    </div>
  </div>
  <div class='row'>
    <div class='col'>
      <label for='home'>Home (Tutte le mail vengono inviate a questo dominio)</label>
      <input type='text' class='form-control' id='home' value='{{ dominio.home }}' readonly>
    </div>
  </div>
  <div class='row'>
    <div class='col'>
      <label for='dic'>Inizio Contratto</label>
      <input type='text' class='form-control' id='idc' value='{{ dominio.date_start_contract }}' readonly>
    </div>
    <div class='col'>
      <label for='psc'>Prossima Scadenza Contratto</label>
      <input type='text' class='form-control' id='psc' value='{{ dominio.date_expire_contract }}' readonly>
    </div>
    <div class='col'>
      <label for='psr'>Prossima Scadenza Registrazione</label>
      <input type='text' class='form-control' id='psr' value='{{ dominio.date_expire_registrar }}' readonly>
    </div>
  </div>
  <hr>
  <div class='col'>
    <div class='row'>
      <label for='proprietario'>Proprietario (verificare anche la corrispondenza della registrazione)</label>
      <textarea name='proprietario' rows='5' class='form-control' readonly=''>{{ dominio.proprietario }}</textarea>
    </div>
    <div class='row'>
      <label for='contatti'>Contatti Email (Separare le email con spazi o virgole)</label>
      <input type='text' class='form-control' id='contatti' name='contatti' readonly='' value='{{ dominio.contatti }}' />
    </div>
  </div>
  <hr>
  <div class='row'>
    <div class='col'>
      <label for='enabled'>Dominio Abilitato</label>
      <input type='checkbox' class='form-check-input' id='enabled' name='enabled' {% if dominio.enabled %} checked {% endif %} disabled>
    </div>
    <div class='col'>
      <label for='tobedeleted'>Dominio Impostato per la cancellazione</label>
      <input type='checkbox' class='form-check-input' id='tobedeleted' name='tobedeleted' {% if dominio.tobedeleted %} checked {% endif %} disabled>
    </div>
  </div>
  <hr>
  <div class="row">
    <div class="col">
      <label for="mail"><h5>mail</h5></label>
      <input type="checkbox" class="form-check-input" id="mail" name="mail" {% if dominio.mail %} checked {% endif %} disabled>
    </div>
    <div class="col">
      <label for="pop3">Pop3/Pop3s</label>
      <input type="checkbox" class="form-check-input" id="pop3" name="pop3" {% if dominio.pop3 %} checked {% endif %} disabled>
    </div>
    <div class="col">
      <label for="pop3">Imap/Imaps</label>
      <input type="checkbox" class="form-check-input" id="pop3" name="pop3" {% if dominio.imap %} checked {% endif %} disabled>
    </div>
    <div class="col">
      <label for="smtp">Smtp/Smpts</label>
      <input type="checkbox" class="form-check-input" id="smtp" name="smtp" {% if dominio.smtp %} checked {% endif %} disabled>
    </div>
    <div class="col">
      <label for="smtp_relay">Smtp/Relay</label>
      <input type="checkbox" class="form-check-input" id="smtp_relay" name="smtp_relay" {% if dominio.smtp_relay %} checked {% endif %} disabled>
    </div>
    <div class="col">
      <label for="smtp_relay">Lmtp</label>
      <input type="checkbox" class="form-check-input" id="lmtp" name="lmtp" {% if dominio.lmtp %} checked {% endif %} disabled>
    </div>
    <div class='col'>
      <label for='webmail'>Webmail</label>
      <input type='checkbox' class='form-check-input' id='webmail' name='webmail' {% if dominio.webmail %} checked {% endif %} disabled>
    </div>
  </div>
  <div class='row'>
    <div class='col'>
      <label for='sieve'>Sieve</label>
      <input type='checkbox' class='form-check-input' id='sieve' name='sieve' {% if dominio.sieve %} checked {% endif %} disabled>
    </div>
    <div class='col'>
      <label for='antivirus'>Antivirus/AntiSpam</label>
      <input type='checkbox' class='form-check-input' id='antivirus' name='antivirus' {% if dominio.sieve %} checked {% endif %} disabled>
    </div>
    <div class='col'>
      <label for='spf'>Spf</label>
      <input type='checkbox' class='form-check-input' id='spf' name='spf' {% if dominio.spf %} checked {% endif %} disabled>
    </div>
    <div class='col'>
      <label for='blacklist'>BlackList</label>
      <input type='checkbox' class='form-check-input' id='blacklist' name='blacklist' {% if dominio.blacklist %} ckecked {% endif %} disabled>
    </div>
    <div class='col'>
      <label for='ftp'>Ftp</label>
      <input type='checkbox' class='form-check-input' id='ftp' name='ftp' readonly='' value='{{ dominio.ftp }}' disabled>
    </div>
    <div class='col'>
      <label for='sql'>Sql</label>
      <input type='checkbox' class='form-check-input' id='sql' name='sql' readonly='' value='{{ dominio.sql }}' disabled>
    </div>
    <div class='col'>
      <label for='nextcloud'>NextCloud</label>
      <input type='checkbox' class='form-check-input' id='nextcloud' name='nextcloud' readonly='' value='{{ dominio.nextcloud }}' disabled>
    </div>
    <div class='col'>
      <label for='nextcloud_pwd'>NextCloud Pass in Sync</label>
      <input type='checkbox' class='form-check-input' id='nextcloud_pwd' name='nextcloud_pwd' readonly='' value='{{ dominio.nextcloud_pwd }}' disabled>
    </div>
  </div>
  <hr>
  <div class='row'>
    <div class='col'>
      <label for='max_account'>Account Max</label>
      <input type='text' class='form-control' id='max_account' name='max_account' value='{{ dominio.max_account }}' readonly>
      <label for='max_account'>Account Usati</label>
      <input type='text' class='form-control' id='used_account' name='used_account' value='{{ used_account }}' readonly>
    </div>
    <div class='col'>
      <label for='max_alias'>Alias Max</label>
      <input type='Text' class='form-control' id='max_alias' name='max_alias' value='{{ dominio.max_alias }}' readonly>
      <label for='max_account'>alias Usati</label>
      <input type='text' class='form-control' id='used_alias' name='used_alias' value='{{ used_alias }}' readonly>
    </div>
    <div class='col'>
      <label for='max_list'>Liste Distribuzione</label>
      <input type='Text' class='form-control' id='max_list' name='max_list'value='{{ dominio.max_list }}' readonly>
      <label for='max_account'>Liste Usate</label>
     <input type='text' class='form-control' id='used_list' name='used_list' value='{{ used_list }}' readonly>
    </div>
  </div>
  <hr>
  Quote In uso (I valori sono espressi in Mega)
  <div class='row'>
    <div class='col text-center'>
      <label for='mail_quota'>Mail Quota</label>
      <input type='text' class='form-control' id='mail_quota' name='mail_quota' value='{{ dominio.mail_quota }}' readonly>
    </div>
    <div class='col'>
      <label for='http_quota'>Http Quota</label>
      <input type='Text' class='form-control' id='http_quota' name='http_quota' value='{{ dominio.http_quota }}' readonly>
    </div>
   <div class='col'>
      <label for='ftp_quota'>Ftp Quota</label>
      <input type='Text' class='form-control' id='ftp_quota' name='ftp_quota'value='{{ dominio.ftp_quota }}' readonly>
    </div>
    <div class='col'>
      <label for='http_quota'>Sql Quota</label>
      <input type='Text' class='form-control' id='http_quota' name='sql_quota' value='{{ dominio.sql_quota }}' readonly>
    </div>
    <div class='col'>
      <label for='nextcloud_quota'>Nextcloud quota</label>
     <input type='text' class='form-control' id='nextcloud_quota' name='nextcloud_quota' value='{{ dominio.nextcloud_quotaa }}' readonly>
    </div>

     <div class='col'>
      <label for='totale'>Totale quota</label>
     <input type='text' class='form-control' id='totale' name='totale' value='{{ totale }}' readonly>
    </div>
  </div>
  <div>
 
  
  <div class='row'>
    <div class='col text-center'>
      <label for='warning_mail_quota'>Quota Allarme per Utente</label>
      <input type='number' class='form-control' id='warning_mail_quota' name='warning_mail_quota' value={{ dominio.warning_mail_quota }}>
    </div>
    <div class='col'>
       <label for='warning_mail_quota_check'>Controllo Soglia</label>
       <input type='checkbox' class='form-check-input' id='warning_mail_quota_check' name='warning_mail_quota_check' {% if dominio.warning_mail_quota_check %} checked {% endif %}>
    </div>
    <div class='col text-center'>
      <label for='update_mail_quota'>Aggiorna Quota Email</label>
      <input type='checkbox' class='form-check-input' id='update_mail_quota' name='update_mail_quota' {% if dominio.update_mail_quota %} checked {% endif %} readonly>
    </div>
    <div class='col text-center'>
      <label for='force_update_mail_quota'>Forza Aggiornamento</label>
      <input type='checkbox' class='form-check-input' id='force_update_mail_quota' name='force_update_mail_quota' {% if dominio.force_update_mail_quota %} checked {% endif %} readonly>
    </div>
  </div>
  <hr>
  {% if ftplist %}
    Spazio FTP assegnato
    <table class='table table-striped table-hover'>
    <thead class='thead-dark'>
      <tr>
        <th>Utente</th>
	<th>Home</th>
	<th>Quota</th>
      </tr>
    </thead>
    <tbody>
    {% for f in ftplist %}
      <tr>
	      <td>{{ f.utente }}</td>
	      <td>{{ f.homedir }}</td>
	      <td>{{ f.quota }}</td>
     </tr>
    {% endfor %}
    </tbody>
  </table>
  {% endif %}
  <hr>
  {% if 'DOMNIEDITDOMAIN' in securitylist %}
 <div class='row'>
      <label for='nota'>Note e appunti</label>
      <textarea name='nota' class='form-control' rows='5' readonly>{{ dominio.nota }}</textarea>
  </div>

  {% endif %}
</form>
</div>
{% endblock %}

