{% extends "layouts/base.html" %}
{% load i18n %}

{% block content %}
{% translate type as display_type %}
{% include 'header.html' %}

<main id="main-content">
  <article>
    <div class="form-view">
      <h1>{% blocktranslate %}Add a {{ display_type }}{% endblocktranslate %}</h1>

      <p>{% translate "Here you can add the asset of the client. Findings can be added to these in the findings page." %}</p>

      <form  method="post" class="horizontal-view">
        {% csrf_token %}

        {% if form.non_field_errors %}
          <div class="warning">
            {{ form.non_field_errors }}
          </div>
        {% endif %}

        <fieldset>
          <legend>{% translate type %}</legend>

          <div>
            <label for="ooi_type">Type</label>

            <input id="ooi_type" type="text" name="ooi_type" value="{{ type }}" readonly>
          </div>

          {% for field in form %}
            {% include "partials/form/field_input_wrapper.html" %}
          {% endfor %}
        </fieldset>

        <button type="submit">{% blocktranslate %}Add {{ display_type }}{% endblocktranslate %}</button>
      </form>
    </div>
  </article>
</main>
{% endblock %}
