Ticket #13875: 13875-r16357.diff

File 13875-r16357.diff, 1.2 KB (added by Alexander Herrmann, 13 years ago)
  • django/contrib/admin/templatetags/admin_modify.py

     
    11from django import template
     2from django.template.context import Context
    23
    34register = template.Library()
    45
     
    2829    change = context['change']
    2930    is_popup = context['is_popup']
    3031    save_as = context['save_as']
    31     return {
     32    new_context = Context(context)
     33    new_context.update({
    3234        'onclick_attrib': (opts.get_ordered_objects() and change
    3335                            and 'onclick="submitOrderForm();"' or ''),
    3436        'show_delete_link': (not is_popup and context['has_delete_permission']
     
    3739        'show_save_and_add_another': context['has_add_permission'] and
    3840                            not is_popup and (not save_as or context['add']),
    3941        'show_save_and_continue': not is_popup and context['has_change_permission'],
    40         'is_popup': is_popup,
    4142        'show_save': True
    42     }
     43    })
     44    return new_context
     45   
    4346
    4447@register.filter
    4548def cell_count(inline_admin_form):
Back to Top