Django

Code

Changeset 4944

Show
Ignore:
Timestamp:
04/06/07 21:29:20 (2 years ago)
Author:
adrian
Message:

newforms-admin: Added temporary hack to the admin 'submit_row' template tag so that things will work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/newforms-admin/django/contrib/admin/templatetags/admin_modify.py

    r4569 r4944  
    2020    change = context['change'] 
    2121    is_popup = context['is_popup'] 
     22    # TODO: Fix this hack. 
     23    # save_as = opts.admin.save_as 
     24    save_as = False 
    2225    return { 
    2326        'onclick_attrib': (opts.get_ordered_objects() and change 
     
    2528        'show_delete_link': (not is_popup and context['has_delete_permission'] 
    2629                              and (change or context['show_delete'])), 
    27         'show_save_as_new': not is_popup and change and opts.admin.save_as, 
    28         'show_save_and_add_another': not is_popup and (not opts.admin.save_as or context['add']), 
     30        'show_save_as_new': not is_popup and change and save_as, 
     31        'show_save_and_add_another': not is_popup and (not save_as or context['add']), 
    2932        'show_save_and_continue': not is_popup and context['has_change_permission'], 
    3033        'show_save': True