Author: ramiro
Date: 2011-10-10 15:19:59 -0700 (Mon, 10 Oct 2011)
New Revision: 16956

Modified:
   django/trunk/django/contrib/admin/templates/admin/change_form.html
Log:
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.

Modified: django/trunk/django/contrib/admin/templates/admin/change_form.html
===================================================================
--- django/trunk/django/contrib/admin/templates/admin/change_form.html  
2011-10-10 17:32:33 UTC (rev 16955)
+++ django/trunk/django/contrib/admin/templates/admin/change_form.html  
2011-10-10 22:19:59 UTC (rev 16956)
@@ -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 %}
@@ -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>

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to