diff --git a/django/contrib/admin/templatetags/admin_modify.py b/django/contrib/admin/templatetags/admin_modify.py
index fe88043..fd8c420 100644
|
a
|
b
|
|
| 1 | 1 | from django import template |
| | 2 | from django.template.context import Context |
| 2 | 3 | |
| 3 | 4 | register = template.Library() |
| 4 | 5 | |
| … |
… |
def submit_row(context):
|
| 27 | 28 | change = context['change'] |
| 28 | 29 | is_popup = context['is_popup'] |
| 29 | 30 | save_as = context['save_as'] |
| 30 | | return { |
| | 31 | new_context = Context(context) |
| | 32 | new_context.update({ |
| 31 | 33 | 'onclick_attrib': (opts.get_ordered_objects() and change |
| 32 | 34 | and 'onclick="submitOrderForm();"' or ''), |
| 33 | 35 | 'show_delete_link': (not is_popup and context['has_delete_permission'] |
| … |
… |
def submit_row(context):
|
| 36 | 38 | 'show_save_and_add_another': context['has_add_permission'] and |
| 37 | 39 | not is_popup and (not save_as or context['add']), |
| 38 | 40 | 'show_save_and_continue': not is_popup and context['has_change_permission'], |
| 39 | | 'is_popup': is_popup, |
| 40 | 41 | 'show_save': True |
| 41 | | } |
| | 42 | }) |
| | 43 | return new_context |
| 42 | 44 | submit_row = register.inclusion_tag('admin/submit_line.html', takes_context=True)(submit_row) |