{% extends 'base.html' %}

{% block header %}
  <h1>{% block title %}Vehicle Parameters for {{vehicle.nickname.value}} {% endblock %}</h1>
{% endblock %}

{% block content %}
<div class="form-wrapper">
  <form method="POST">
      {{ form.csrf_token }}

      <fieldset class="form-field">
        {{ form.primary_capacity.label }}
        {{ form.primary_capacity(size=5) }}
        {% if form.primary_capacity.errors %}
          <ul class="errors">
            {% for error in form.primary_capacity.errors %}
              <li>{{ error }}</li>
            {% endfor %}
          </ul>
        {% endif %}
      </fieldset>

      <fieldset class="form-field">
        {{ form.primary_wltp_range.label }}
        {{ form.primary_wltp_range(size=5) }}
        {% if form.primary_wltp_range.errors %}
          <ul class="errors">
            {% for error in form.primary_wltp_range.errors %}
              <li>{{ error }}</li>
            {% endfor %}
          </ul>
        {% endif %}
      </fieldset>

      <fieldset class="form-field">
        {{ form.secondary_capacity.label }}
        {{ form.secondary_capacity(size=5) }}
        {% if form.secondary_capacity.errors %}
          <ul class="errors">
            {% for error in form.secondary_capacity.errors %}
              <li>{{ error }}</li>
            {% endfor %}
          </ul>
        {% endif %}
      </fieldset>


      <fieldset class="form-field">
        {{ form.secondary_wltp_range.label }}
        {{ form.secondary_wltp_range(size=5) }}
        {% if form.secondary_wltp_range.errors %}
          <ul class="errors">
            {% for error in form.secondary_wltp_range.errors %}
              <li>{{ error }}</li>
            {% endfor %}
          </ul>
        {% endif %}
      </fieldset>

      {{ form.save }}

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

