{% extends "base.html" %}

{% block menu %}
{% endblock %}

{% block content %}
  {% if modalità == "edit" or modalità == "add" %}
  <form method="post">
    <div class="container">
      <div class="form-group">
        <label for="mail">{{ 'E-mail'|t }}</label>
        <input id="mail" type="text" name="mail" placeholder="{{ 'user@provider-email-domain.com'|t }}" required>
      </div>
      <div class="form-group">
        <label for="name">{{ 'Name'|t }}</label>
        <input id="name" type="text" name="name" placeholder="{{ 'Name Surname'|t }}" required>
      </div>
      <div class="form-group">
        <label for="username">{{ 'Username'|t }}</label>
        <input id="username" type="text" name="username" placeholder="{{ 'name.surname'|t }}" required>
      </div>
      <div class="form-group">
        <label>{{ 'Password'|t }}</label>
        <input id="password" type="text" name="password" required>
      </div>
      <div class="form-group">
        <label for="phone_number">{{ 'Phone number'|t }}</label>
        <input id="phone_number" type="tel" name="phone_number" required>
      </div>
      <div class="form-group">
        <label for="date-picker">{{ 'Birthday'|t }}</label>
        <input id="date-picker" placeholder="DD/MM/YYY" autocomplete="off" name="birthday" value="{{ values.date }}" type="text">
      </div>
      <div class="form-group">
        <label for="chief">{{ 'Chief'|t }}</label><br>
        <input id="chief" type="checkbox" name="chief">
      </div>
      <div class="form-group">
      <label for="driver">{{ 'Driver'|t }}</label><br>
      <input id="driver" type="checkbox" name="driver">
      </div>
      <div class="form-group">
        <label for="visible">{{ 'Visible'|t }}</label><br>
        <input id="visible" type="checkbox" name="visible" checked>
      </div>
      <div class="form-group">
        <label for="enabled">{{ 'Enabled'|t }}</label><br>
        <input id="enabled" type="checkbox" name="enabled" checked>
      </div>
      <br>
      <input id="modalità" type="hidden" value="{{ modalità }}" name="mod"></input>
      <input id="token" type="hidden" value="{{ token }}" name="token"></input>
      <button type="submit">{{ 'Submit'|t }}</button>
    </div>
  </form>
  {% endif %}
  {% if modalità == "delete" %}
  <div style="margin: 0 auto; text-align: center">
    <p>{{ 'Are you sure you want to delete the user?'|t }}</p>
    <form method="post">
      <input id="modalità" type="hidden" value="delete" name="mod"></input>
      <input id="token" type="hidden" value="{{ token }}" name="token"></input>
      <input id="id" type="hidden" value="{{ id }}" name="id"></input>
      <button id="remove" type="submit">{{ 'Submit'|t }}</button>
    </form>
  </div>
  {% endif %}

{% block footer %}
{% endblock %}

{% endblock %}