mirror of
https://github.com/django/django.git
synced 2025-07-05 10:19:20 +00:00
magic-removal: Removed the 'Save and continue editing' button in the case where user does not have the 'change' permission, since
the button does not allow them to actually do that in that situation. git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
339a320226
commit
9474b37bdf
@ -32,7 +32,7 @@ def submit_row(context):
|
||||
and (change or context['show_delete'])),
|
||||
'show_save_as_new': not is_popup and change and opts.admin.save_as,
|
||||
'show_save_and_add_another': not is_popup and (not opts.admin.save_as or context['add']),
|
||||
'show_save_and_continue': not is_popup,
|
||||
'show_save_and_continue': not is_popup and context['has_change_permission'],
|
||||
'show_save': True
|
||||
}
|
||||
submit_row = register.inclusion_tag('admin/submit_line', takes_context=True)(submit_row)
|
||||
|
@ -201,6 +201,7 @@ def render_change_form(model, manipulator, context, add=False, change=False, for
|
||||
'add': add,
|
||||
'change': change,
|
||||
'has_delete_permission': context['perms'][app_label][opts.get_delete_permission()],
|
||||
'has_change_permission': context['perms'][app_label][opts.get_change_permission()],
|
||||
'has_file_field': opts.has_field_type(models.FileField),
|
||||
'has_absolute_url': hasattr(model, 'get_absolute_url'),
|
||||
'auto_populated_fields': auto_populated_fields,
|
||||
|
Loading…
x
Reference in New Issue
Block a user