#5520: [newforms-admin] - support for save_as
-----------------------------------------------------+----------------------
   Reporter:  Petr Marhoun <[EMAIL PROTECTED]>  |                Owner:  nobody 
        
     Status:  new                                    |            Component:  
Admin interface
    Version:  newforms-admin                         |           Resolution:    
             
   Keywords:  admin, save_as                         |                Stage:  
Unreviewed     
  Has_patch:  1                                      |           Needs_docs:  0 
             
Needs_tests:  0                                      |   Needs_better_patch:  0 
             
-----------------------------------------------------+----------------------
Changes (by Petr Marhoun <[EMAIL PROTECTED]>):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 New version of patch - now save_as works without any problem. It is better
 than in oldforms admin.

 The final version of submit row (with #5447):

 {{{
 #!python
 def submit_row(context):
     # ...
         'show_delete_link': change and context['has_delete_permission']
 and not is_popup and not is_save_as,
         'show_save_as_new': save_as and (is_save_as or change) and
 context['has_add_permission'] and not is_popup,
         'show_save_and_add_another': (add or not save_as) and
 context['has_add_permission'] and not is_popup and not is_save_as,
         'show_save_and_continue': context['has_change_permission'] and not
 is_popup and not is_save_as,
         'show_save': not is_save_as,
     }
 }}}

 As popup (is_popup is True) only save button is showed.

 In saving as (is_save_as is True) only save_as_new button is showed.

 Otherwise:
  * In add state - save_and_add_another (with add_permission),
 save_and_continue (with change_permission) and save buttons are showed.
  * In change state without save_as - delete (with delete permission),
 save_and_add_another (with add_permission), save_and_continue (with
 change_permission) and save buttons are showed.
  * In change state with save_as - delete (with delete permission), save_as
 (with add_permission), save_and_continue (with change_permission) and save
 buttons are showed.

 I also removed form_url - it is not needed in this solution.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5520#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to