{% extends 'layouts/default.twig' %}

{% block title %}Add a Test{% endblock %}

{% block content %}
<div class="row">
  <h2>Add a test</h2>

  <form class="twelve columns" action="/test/add" method="POST">
    <div class="row">
      <div class="three columns">
        <label for="test_title">
          Test title:
          <input id="test_title" class="u-full-width" type="text" name="test_title" placeholder="My test">
        </label>
      </div>

      <div class="nine columns">
        <label for="test_hardware">
          Test hardware:
          <select id="test_hardware" class="u-full-width" name="test_hardware">
            {% for h in hardware %}
              <option value="{{ h.id }}">{{ h.name }}</option>
            {% endfor %}
          </select>
        </label>
      </div>
    </div>

    <div class="row">
      <div class="twelve columns">
        <label for="test_benchmarks">
          Test benchmarks:
          <select id="test_benchmarks" class="u-full-width" name="test_benchmarks[]" multiple>
            {% for b in benchmarks %}
              <option value="{{ b.id }}">{{ b.name }}</option>
            {% endfor %}
          </select>
        </label>
      </div>
    </div>

    <div class="row">
      <label for="test_description">
        Test description:
        <textarea id="test_description" class="twelve columns" cols="30" rows="10" name="test_description"></textarea>
      </label>
    </div>

    <input class="button-primary u-full-width" type="submit" value="Submit">
  </form>
</div>
{% endblock %}