Ticket #9460: change_form_all_in_blocks.diff

File change_form_all_in_blocks.diff, 2.4 KB (added by Jari Pennanen, 15 years ago)

Even more blocks! Now all is customizable.

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

     
    2121</div>
    2222{% endif %}{% endblock %}
    2323
    24 {% block content %}<div id="content-main">
     24{% block content %}{% block content_top %}<div id="content-main">{% endblock %}
    2525{% block object-tools %}
    2626{% if change %}{% if not is_popup %}
    2727  <ul class="object-tools"><li><a href="history/" class="historylink">{% trans "History" %}</a></li>
     
    2929  </ul>
    3030{% endif %}{% endif %}
    3131{% endblock %}
    32 <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
     32
     33{% block form_top %}
     34<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">
    3335<div>
    3436{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    35 {% if save_on_top %}{% submit_row %}{% endif %}
     37{% endblock %}
     38
     39{% block submit_row_top %}{% if save_on_top %}{% submit_row %}{% endif %}{% endblock %}
     40
     41{% block errors %}
    3642{% if errors %}
    3743    <p class="errornote">
    3844    {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    3945    </p>
    4046    <ul class="errorlist">{% for error in adminform.form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
    4147{% endif %}
     48{% endblock %}
    4249
     50{% block fieldsets %}
    4351{% for fieldset in adminform %}
    4452  {% include "admin/includes/fieldset.html" %}
    4553{% endfor %}
     54{% endblock %}
    4655
    4756{% block after_field_sets %}{% endblock %}
    4857
     58{% block inline_admin_formsets %}
    4959{% for inline_admin_formset in inline_admin_formsets %}
    5060    {% include inline_admin_formset.opts.template %}
    5161{% endfor %}
     62{% endblock %}
    5263
    5364{% block after_related_objects %}{% endblock %}
    5465
     66{% block submit_row_bottom %}
    5567{% submit_row %}
     68{% endblock %}
    5669
     70{% block form_bottom %}
    5771{% if add %}
    5872   <script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script>
    5973{% endif %}
     
    6276{% prepopulated_fields_js %}
    6377
    6478</div>
    65 </form></div>
     79</form>
    6680{% endblock %}
     81{% block content_bottom %}</div>{% endblock %}
     82{% endblock %}
Back to Top