#NEWLINE# @ register . inclusion_tag ( 'admin/submit_line.html' , takes_context = True ) #NEWLINE# def submit_row_extended_save_continue( context ) : #NEWLINE# #INDENT# '\n    Displays the row of buttons for delete and save.\n    ' #NEWLINE# opts = context [ 'opts' ] #NEWLINE# change = context [ 'change' ] #NEWLINE# is_popup = context [ 'is_popup' ] #NEWLINE# save_as = context [ 'save_as' ] #NEWLINE# delete_button_name = context . get ( 'delete_button_name' , 'Delete' ) #NEWLINE# ctx = { #NEWLINE# #INDENT# 'opts' : opts , #NEWLINE# 'onclick_attrib' : ( ( change and 'onclick="submitOrderForm();"' ) or '' ) , #NEWLINE# 'show_delete_link' : ( ( not opts ) and context [ 'has_delete_permission' ] and change and context . get ( 'show_delete' , True ) ) , #NEWLINE# 'show_save_as_new' : ( ( not is_popup ) and change and save_as ) , #NEWLINE# 'show_save_and_add_another' : ( context [ 'has_add_permission' ] and ( not is_popup ) and ( ( not save_as ) or context [ 'add' ] ) ) , #NEWLINE# 'show_save_and_continue' : ( ( not is_popup ) and context [ 'has_change_permission' ] ) , #NEWLINE# 'is_popup' : is_popup , #NEWLINE# 'show_save' : True , #NEWLINE# 'delete_button_name' : delete_button_name , #NEWLINE# #UNINDENT# } #NEWLINE# if ( context . get ( 'original' ) is not None ) : #NEWLINE# #INDENT# ctx [ 'original' ] = context [ 'original' ] #NEWLINE# #UNINDENT# return ctx