Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #9460 -- Added template blocks for submit buttons rows in admin…

… 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...
commit 4725a732e7b102636598e31fea4f683069a73086 1 parent c61987d
Ramiro Morales authored October 10, 2011
4  django/contrib/admin/templates/admin/change_form.html
@@ -40,7 +40,7 @@
40 40
 <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 %}
41 41
 <div>
42 42
 {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
43  
-{% if save_on_top %}{% submit_row %}{% endif %}
  43
+{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
44 44
 {% if errors %}
45 45
     <p class="errornote">
46 46
     {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
@@ -64,7 +64,7 @@
64 64
 
65 65
 {% block after_related_objects %}{% endblock %}
66 66
 
67  
-{% submit_row %}
  67
+{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
68 68
 
69 69
 {% if adminform and add %}
70 70
    <script type="text/javascript">document.getElementById("{{ adminform.first_field.id_for_label }}").focus();</script>

0 notes on commit 4725a73

Please sign in to comment.
Something went wrong with that request. Please try again.