Skip to content

Commit

Permalink
newforms-admin: Added temporary hack to the admin 'submit_row' templa…
Browse files Browse the repository at this point in the history
…te tag so that things will work

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Apr 7, 2007
1 parent e03e021 commit 98a0aec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions django/contrib/admin/templatetags/admin_modify.py
Expand Up @@ -19,13 +19,16 @@ def submit_row(context):
opts = context['opts']
change = context['change']
is_popup = context['is_popup']
# TODO: Fix this hack.
# save_as = opts.admin.save_as
save_as = False
return {
'onclick_attrib': (opts.get_ordered_objects() and change
and 'onclick="submitOrderForm();"' or ''),
'show_delete_link': (not is_popup and context['has_delete_permission']
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_as_new': not is_popup and change and save_as,
'show_save_and_add_another': not is_popup and (not save_as or context['add']),
'show_save_and_continue': not is_popup and context['has_change_permission'],
'show_save': True
}
Expand Down

0 comments on commit 98a0aec

Please sign in to comment.