<!DOCTYPE html>
<html>
<head>
  <link href="favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">
  <script src="{{ urlsoftware }}/resources/dist/{{ resource('main.js') }}"></script>
  {% if enable_debug_bar %}{{ debug_bar_head|raw }}{% endif %}
</head>
<body>
  {% if modalità == "edit" or modalità == "add" %}
  <form method="post">
    <div class="container">
      <label><b>{{ 'E-mail'|t }}</b></label>
      <input id="mail" type="text" name="mail" placeholder="{{ 'user@provider-email-domain.com'|t }}" required>
      <br>
      <br>
      <label><b>{{ 'Name'|t }}</b></label>
      <input id="name" type="text" name="name" placeholder="{{ 'Name Surname'|t }}" required>
      <br>
      <br>
      <label><b>{{ 'Username'|t }}</b></label>
      <input id="username" type="text" name="username" placeholder="{{ 'name.surname'|t }}" required>
      <br>
      <br>
      <label><b>{{ 'Password'|t }}</b></label>
      <input id="password" type="text" name="password" required>
      <br>
      <br>
      <label><b>{{ 'Phone number'|t }}</b></label>
      <input id="phone_number" type="tel" name="phone_number" required>
      <br>
      <br>
      <label><b>{{ 'Birthday'|t }}</b></label>
      <div class="input-group">
        <input placeholder="DD/MM/YYY" autocomplete="off" name="birthday" data-provide="datepicker"
          value="{{ values.date }}" type="text" class="form-control">
        <div class="input-group-addon">
          <span class="glyphicon glyphicon-th"></span>
        </div>
      </div>
      <br>
      <br>
      <style>
        .toggle.workaround {
          border: 1px solid black;
        }
      </style>
      <label><b>{{ 'Chief'|t }}</b></label><br>
      <input type="checkbox" name="chief" data-toggle="toggle" data-style="workaround">
      <br>
      <br>
      <label><b>{{ 'Driver'|t }}</b></label><br>
      <input type="checkbox" name="driver" data-toggle="toggle" data-style="workaround">
      <br>
      <br>
      <label><b>{{ 'Visible'|t }}</b></label><br>
      <input type="checkbox" name="visible" checked data-toggle="toggle" data-style="workaround">
      <br>
      <br>
      <label><b>{{ 'Enabled'|t }}</b></label><br>
      <input type="checkbox" name="enabled" checked data-toggle="toggle" data-style="workaround">
      <br>
      <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>
    <script>
      $('form').submit(function () {
        return confirm("{{ 'The action cannot be canceled. Are you sure you want to continue?'|t }}");
      });
    </script>
  </div>
  {% endif %}
  {% if enable_debug_bar %}{{ debug_bar|raw }}{% endif %}
</body>
</html>