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

{% block extrahead %}{{ block.super }}
  <script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
  {{ media }}
{% endblock %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %}

{% if not is_popup %}
  {% block breadcrumbs %}
    <div class="breadcrumbs">
      <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
      &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
      &rsaquo;
      {% if has_view_permission %}
        <a href="{% url opts|admin_urlname:'changelist' %}">
          {{ opts.verbose_name_plural|capfirst }}
        </a>
      {% else %}
        {{ opts.verbose_name_plural|capfirst }}
      {% endif %}
      &rsaquo; Generate {{ opts.verbose_name_plural|capfirst|truncatewords:"18" }}
    </div>
  {% endblock %}
{% endif %}

{% block content %}
  {% url opts|admin_urlname:'generate' as generate_url %}
  <form action="{{ generate_url }}" method="post" id="{{ opts.model_name }}_form" novalidate>
    {% csrf_token %}
    {% block form_top %}
    {% endblock %}

    <fieldset class="module aligned">
      <div class="form-row field-generate-num">
        <div>
          <label class="required" for="id_generate_num">Number to Generate:</label>
          <input type="number" name="generate_num" value="1" min="1" required id="id_generate_num" />
        </div>
      </div>
    </fieldset>

    <div class="submit-row">
      <input type="submit" value="Generate" class="default" name="_save" />
    </div>
  </form>
{% endblock %}