@@ -762,9 +762,12 @@ def classhelp(self, properties=None, label=''"(list)", width='500',
762762 (help_url , onclick , cgi_escape_attrs (** html_kwargs ),
763763 self ._ (label ))
764764
765- def submit (self , label = '' "Submit New Entry" , action = "new" ):
765+ def submit (self , label = '' "Submit New Entry" , action = "new" , html_kwargs = {} ):
766766 """ Generate a submit button (and action hidden element)
767767
768+ "html_kwargs" specified additional html args for the
769+ generated html <select>
770+
768771 Generate nothing if we're not editable.
769772 """
770773 if not self .is_edit_ok ():
@@ -775,7 +778,8 @@ def submit(self, label=''"Submit New Entry", action="new"):
775778 '\n ' + \
776779 self .input (type = "hidden" , name = "@action" , value = action ) + \
777780 '\n ' + \
778- self .input (type = "submit" , name = "submit_button" , value = self ._ (label ))
781+ self .input (type = "submit" , name = "submit_button" , value = self ._ (label ),
782+ ** html_kwargs )
779783
780784 def history (self ):
781785 if not self .is_view_ok ():
@@ -905,9 +909,12 @@ def is_retired(self):
905909 """Is this item retired?"""
906910 return self ._klass .is_retired (self ._nodeid )
907911
908- def submit (self , label = '' "Submit Changes" , action = "edit" ):
912+ def submit (self , label = '' "Submit Changes" , action = "edit" , html_kwargs = {} ):
909913 """Generate a submit button.
910914
915+ "html_kwargs" specified additional html args for the
916+ generated html <select>
917+
911918 Also sneak in the lastactivity and action hidden elements.
912919 """
913920 return self .input (type = "hidden" , name = "@lastactivity" ,
@@ -919,7 +926,7 @@ def submit(self, label=''"Submit Changes", action="edit"):
919926 self .input (type = "hidden" , name = "@action" , value = action ) + \
920927 '\n ' + \
921928 self .input (type = "submit" , name = "submit_button" ,
922- value = self ._ (label ))
929+ value = self ._ (label ), ** html_kwargs )
923930
924931 def journal (self , direction = 'descending' ):
925932 """ Return a list of HTMLJournalEntry instances.
0 commit comments