Ticket #5681: patch5681.diff

File patch5681.diff, 1.5 KB (added by sebastian.hillig, 16 years ago)

against rev 10203

  • django/contrib/admin/options.py

     
    774774            'title': _('Add %s') % force_unicode(opts.verbose_name),
    775775            'adminform': adminForm,
    776776            'is_popup': request.REQUEST.has_key('_popup'),
     777            'save_as_new': request.POST.has_key('_saveasnew'),
    777778            'show_delete': False,
    778779            'media': mark_safe(media),
    779780            'inline_admin_formsets': inline_admin_formsets,
  • django/contrib/admin/templatetags/admin_modify.py

     
    2929                            and 'onclick="submitOrderForm();"' or ''),
    3030        'show_delete_link': (not is_popup and context['has_delete_permission']
    3131                              and (change or context['show_delete'])),
    32         'show_save_as_new': not is_popup and change and save_as,
     32        'show_save_as_new': not is_popup and ((change and save_as) or context['save_as_new']),
    3333        'show_save_and_add_another': context['has_add_permission'] and
    3434                            not is_popup and (not save_as or context['add']),
    3535        'show_save_and_continue': not is_popup and context['has_change_permission'],
Back to Top