Ticket #10283: change_form.diff

File change_form.diff, 1.6 KB (added by Jari Pennanen, 16 years ago)

change_form.html extra blocks, for customization.

  • django/contrib/admin/templates/admin/change_form.html

     
    3232<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
    3333<div>
    3434{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    35 {% if save_on_top %}{% submit_row %}{% endif %}
     35{% block submit_row_top %}{% if save_on_top %}{% submit_row %}{% endif %}{% endblock %}
     36{% block errors %}
    3637{% if errors %}
    3738    <p class="errornote">
    3839    {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    3940    </p>
    4041    <ul class="errorlist">{% for error in adminform.form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
    4142{% endif %}
    42 
     43{% endblock %}
     44{% block fieldsets %}
    4345{% for fieldset in adminform %}
    4446  {% include "admin/includes/fieldset.html" %}
    4547{% endfor %}
     48{% endblock %}
    4649
    4750{% block after_field_sets %}{% endblock %}
    4851
     52{% block inline_admin_formsets %}
    4953{% for inline_admin_formset in inline_admin_formsets %}
    5054    {% include inline_admin_formset.opts.template %}
    5155{% endfor %}
     56{% endblock %}
    5257
    5358{% block after_related_objects %}{% endblock %}
    5459
     60{% block submit_row_bottom %}
    5561{% submit_row %}
     62{% endblock %}
    5663
    5764{% if add %}
    5865   <script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script>
Back to Top