{% extends "main/base.html" %}
{% load static %}
{% load main_extras %}
{% load i18n %}
{% block title %}
  {% if form.instance|adding %}
    {% block title_new %}{% endblock %}
  {% else %}
    {{ form.instance }}
  {% endif %}
  – Nummi
{% endblock %}
{% block link %}
  {{ block.super }}
  {% css "main/css/form.css" %}
  {% css "main/css/table.css" %}
  {% css "main/css/plot.css" %}
{% endblock %}
{% block body %}
  {% with instance=form.instance %}
    {% if instance|adding %}
      <h2 class="new">
        {% block h2_new %}{% endblock %}
      </h2>
    {% else %}
      <h2>
        {% block h2 %}{{ instance }}{% endblock %}
      </h2>
    {% endif %}
    {% block pre %}{% endblock %}
    <form method="post" enctype="multipart/form-data">
      {% csrf_token %}
      {% if instance|adding %}
        <input hidden name="next" value="{{ request.path }}">
      {% endif %}
      {{ form }}
    </form>
    {% block tables %}{% endblock %}
  {% endwith %}
{% endblock %}
