diff --git a/polymorphic/admin.py b/polymorphic/admin.py index 7da7fec..b192dee 100644 --- a/polymorphic/admin.py +++ b/polymorphic/admin.py @@ -336,6 +336,8 @@ class PolymorphicParentModelAdmin(admin.ModelAdmin): 'has_change_permission': self.has_change_permission(request), 'form_url': mark_safe(form_url), 'opts': opts, + 'add': True, + 'save_on_top': self.save_on_top, }) if hasattr(self.admin_site, 'root_path'): context['root_path'] = self.admin_site.root_path # Django < 1.4 diff --git a/polymorphic/templates/admin/polymorphic/add_type_form.html b/polymorphic/templates/admin/polymorphic/add_type_form.html index 2589e49..20cc8ab 100644 --- a/polymorphic/templates/admin/polymorphic/add_type_form.html +++ b/polymorphic/templates/admin/polymorphic/add_type_form.html @@ -1,43 +1,11 @@ {% extends "admin/change_form.html" %} -{% load i18n %} -{% load url from future %} - -{% block breadcrumbs %}{% if not is_popup %} - -{% endif %}{% endblock %} - -{% block content %}
-
{% csrf_token %}{% block form_top %}{% endblock %} -
-{% if is_popup %}{% endif %} {% if save_on_top %} -
- -
+ {% block submit_buttons_top %} + {% include 'admin/submit_line.html' with show_save=1 %} + {% endblock %} {% endif %} -{% if errors %} -

- {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} -

- {{ adminform.form.non_field_errors }} -{% endif %} - -{% for fieldset in adminform %} - {% include "admin/includes/fieldset.html" %} -{% endfor %} - -
- -
- - -
-
+{% block submit_buttons_bottom %} + {% include 'admin/submit_line.html' with show_save=1 %} {% endblock %}