Skip to content

Commit

Permalink
Fixed #9460 -- Added template blocks for submit buttons rows in admin…
Browse files Browse the repository at this point in the history
… app model add/change views.

This allows for easier customization. Thanks kosmik for report and patch.

Refs #13875.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
ramiro committed Oct 10, 2011
1 parent c61987d commit 4725a73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/contrib/admin/templates/admin/change_form.html
Expand Up @@ -40,7 +40,7 @@
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
<div>
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if save_on_top %}{% submit_row %}{% endif %}
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
{% if errors %}
<p class="errornote">
{% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
Expand All @@ -64,7 +64,7 @@

{% block after_related_objects %}{% endblock %}

{% submit_row %}
{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}

{% if adminform and add %}
<script type="text/javascript">document.getElementById("{{ adminform.first_field.id_for_label }}").focus();</script>
Expand Down

0 comments on commit 4725a73

Please sign in to comment.