<section class="container mt-3">
  <div class="row">
    <h1>Ajouter un variable</h1>
    <div class="col">
      <form method="POST" action="/setting/variable/save">
          <div class="form-group">
            <label for="variable">Variable</label>
            <input type="text" class="form-control" id="variable" name="variable" placeholder="Nom de la variable" required>
            <% if (errors && errors.find(error => error.path === 'variable')) { %>
              <p class="text-danger"><%= errors.find(error => error.path === 'variable').msg %></p>
            <% } %>
          </div>
          <div class="form-group">
            <label for="value">Valeur</label>
            <input type="text" class="form-control" id="value" name="value" placeholder="Valeur de la variable" required>
            <% if (errors && errors.find(error => error.path === 'value')) { %>
              <p class="text-danger"><%= errors.find(error => error.path === 'value').msg %></p>
          <% } %>
          </div>
          <button type="submit" class="btn btn-primary">Enregistrer</button>
      </form>
    </div>
  </div>
</section>
