1
{% extends "admin/base_site.html" %}
2
{% load i18n admin_modify adminmedia %}
4
{% block extrahead %}{{ block.super }}
5
<script type="text/javascript" src="../../../jsi18n/"></script>
9
{% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %}
11
{% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}
13
{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
15
{% block breadcrumbs %}{% if not is_popup %}
16
<div class="breadcrumbs">
17
<a href="../../../">{% trans "Home" %}</a> ›
18
<a href="../">{{ opts.verbose_name_plural|capfirst }}</a> ›
19
{% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18" }}{% endif %}
21
{% endif %}{% endblock %}
23
{% block content %}<div id="content-main">
24
{% block object-tools %}
25
{% if change %}{% if not is_popup %}
26
<ul class="object-tools"><li><a href="history/" class="historylink">{% trans "History" %}</a></li>
27
{% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
29
{% endif %}{% endif %}
31
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
33
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
34
{% if save_on_top %}{% submit_row %}{% endif %}
37
{% blocktrans count errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
39
<ul class="errorlist">{% for error in adminform.form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
42
{% for fieldset in adminform %}
43
{% include "admin/includes/fieldset.html" %}
46
{% block after_field_sets %}{% endblock %}
48
{% for inline_admin_formset in inline_admin_formsets %}
49
{% include inline_admin_formset.opts.template %}
52
{% block after_related_objects %}{% endblock %}
57
<script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script>
60
{# JavaScript for prepopulated fields #}
63
<script type="text/javascript">
64
{% for field in adminform.prepopulated_fields %}
65
document.getElementById("{{ field.field.auto_id }}").onchange = function() { this._changed = true; };
66
{% for dependency in field.dependencies %}
67
document.getElementById("{{ dependency.auto_id }}").onkeyup = function() {
68
var e = document.getElementById("{{ field.field.auto_id }}");
69
if (!e._changed) { e.value = URLify({% for innerdep in field.dependencies %}document.getElementById("{{ innerdep.auto_id }}").value{% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length }}); }