{% extends "admin/base_site.html" %}
{% load i18n %}

{% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans "Home" %}</a>
{% if changelist_url %}
&rsaquo; <a href="{{ changelist_url }}">{{ opts.verbose_name_plural|capfirst }}</a>
{% endif %}
{% if original_url %}
&rsaquo; <a href="{{ original_url }}">{{ object|truncatewords:"18" }}</a>
{% endif %}
&rsaquo; {{ title }}
</div>
{% endblock %}

{% block content %}
{% if form %}
  <form method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <div>
      <fieldset class="module aligned">
        {{ form.as_p }}
      </fieldset>
      {% block extra_content %}{% endblock %}
      <div class="submit-row">
        {% if buttons %}
          {% for val, tra in buttons.items %}
            <input type="submit" value="{{ tra }}" class="default" name="{{ val }}">
          {% endfor %}
        {% else %}
          <input type="submit" value="{% trans 'Save' %}" class="default" name="_save">
        {% endif %}
      </div>
    </div>
  </form>
{% else %}
  <div class="errornote">
    <p>{% trans "No form available in context." %}</p>
    <p>Debug: form variable is {{ form|default:"not set" }}</p>
  </div>
{% endif %}
{% endblock %}
