Ticket #5650: skip_save_as_without_perm_r6442.patch
File skip_save_as_without_perm_r6442.patch, 1.7 KB (added by , 17 years ago) |
---|
-
contrib/admin/templatetags/admin_modify.py
28 28 and 'onclick="submitOrderForm();"' or ''), 29 29 'show_delete_link': (not is_popup and context['has_delete_permission'] 30 30 and (change or context['show_delete'])), 31 'show_save_as_new': not is_popup and change and save_as, 32 'show_save_and_add_another': not is_popup and (not save_as or context['add']), 31 'show_save_as_new': (not is_popup and change and save_as 32 and context['has_add_permission']), 33 'show_save_and_add_another': (not is_popup and (not save_as or context['add']) 34 and context['has_add_permission']), 33 35 'show_save_and_continue': not is_popup and context['has_change_permission'], 34 36 'show_save': True 35 37 } -
contrib/admin/views/main.py
119 119 extra_context = { 120 120 'add': add, 121 121 'change': change, 122 'has_add_permission': context['perms'][app_label][opts.get_add_permission()], 122 123 'has_delete_permission': context['perms'][app_label][opts.get_delete_permission()], 123 124 'has_change_permission': context['perms'][app_label][opts.get_change_permission()], 124 125 'has_file_field': True, # FIXME - this should check if form or formsets have a FileField,