{% extends 'base.html' %}

{% block top %}
  <div class='form-outline mb-3 text-center btn-primary h3'>
     {{ HeaderTitle }}
  </div>
  <div class='form-outline mb-3 text-center btn-primary h3'>
     Amministratore: {{ admin.username }} 
  </div>
{% endblock %}

{% block body %}
  <!-- errori form sede -->
  {% if sede.errors %}
    <div class="alert alert-danger">
    {{ sede.errors }}
    </div>
  {% endif %}
  <!-- fine zona errori -->

  <!-- profilo sede -->
  <form name='SedeEdit' method='post'>
    {% csrf_token %}

    <div class='form-group'>
      <label for="login">Login Amministratore</label>
      <input type='text' class='form-control form-control-lg' name='login' id='login' value='{{ amministratore.login.value }}' {% if admin.sola_lettura %}readonly{% endif %}>
    </div>
    <div class='form-group'>
      <label for="nome">Nome</label>
      <input type='text' class='form-control form-control-lg' name='nome' id='nome' value='{{ amministratore.nome.value }}' {% if admin.sola_lettura %}readonly{% endif %}>
    </div>
   <div class='form-group'>
     <label for="mail">Email</label>
      <input type='text' class='form-control form-control-lg' name='mail' id='mail' value='{{ amministratore.mail.value }}' {% if admin.sola_lettura %}readonly{% endif %}>
    </div>
    <div class='form-group'>
     <label for="pin">Pin/Password</label>
      <input type='text' class='form-control form-control-lg' name='pin' id='pin' value='{{ amministratore.pin.value }}' {% if admin.sola_lettura %}readonly{% endif %}>
    </div>

    <div class="btn-group">
      <input type='submit' class="btn btn-primary" value='Aggiorna' {% if admin.sola_lettura %} disable {% endif %}>
      <input type='submit' class="btn btn-primary" name="indietro" value="Indietro">
    </div>

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

