diff --git a/lib/galaxy/web/base/controller.py b/lib/galaxy/web/base/controller.py index e2e374da4f0..f5bc40033e9 100644 --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -289,7 +289,6 @@ class UsesFormDefinitions: return forms @web.expose def add_template( self, trans, cntrller, item_type, form_type, **kwd ): - log.debug("#### IN add_template, kwd: %s" % str( kwd )) params = util.Params( kwd ) form_id = params.get( 'form_id', 'none' ) message = util.restore_text( params.get( 'message', '' ) ) @@ -418,7 +417,6 @@ class UsesFormDefinitions: decoded_form_id = trans.security.decode_id( form_id ) except: decoded_form_id = None - log.debug("#### IN add_template, decoded_form_id: %s" % str( decoded_form_id )) if decoded_form_id: for form in forms: if decoded_form_id == form.id: @@ -445,7 +443,6 @@ class UsesFormDefinitions: ldda_id=ldda_id, inheritable_checked=inheritable, show_deleted=show_deleted ) ) - log.debug("#### IN add_template, widgets: %s" % str( widgets )) return trans.fill_template( '/common/select_template.mako', **new_kwd ) @web.expose @@ -505,7 +502,6 @@ class UsesFormDefinitions: info_association = rtra.run template = info_association.template info = info_association.info - log.debug("&&&&&&&&In edit_template, info: %s" % str( info )) form_values = trans.sa_session.query( trans.app.model.FormValues ).get( info.id ) if edited: # The form on which the template is based has been edited, so we need to update the @@ -544,7 +540,6 @@ class UsesFormDefinitions: return trans.response.send_redirect( web.url_for( controller='forms', action='edit_form_definition', **vars ) ) @web.expose def edit_template_info( self, trans, cntrller, item_type, form_type, **kwd ): - log.debug(">>>>>>>>>>>In edit_template_info, kwd: %s" % str( kwd )) # Edit the contents of the template fields without altering the template itself. params = util.Params( kwd ) # form_type must be one of: RUN_DETAILS_TEMPLATE, LIBRARY_INFO_TEMPLATE @@ -591,11 +586,8 @@ class UsesFormDefinitions: status='error' ) ) # We need the type of each template field widget widgets = item.get_template_widgets( trans ) - log.debug(">>>>>>>>>>>In edit_template_info, widgets: %s" % str( widgets )) # The list of widgets may include an AddressField which we need to save if it is new for index, widget_dict in enumerate( widgets ): - log.debug(">>>>>>>>>>>In edit_template_info, index: %s" % str( index )) - log.debug(">>>>>>>>>>>In edit_template_info, widget_dict: %s" % str( widget_dict )) widget = widget_dict[ 'widget' ] if isinstance( widget, AddressField ): #value = util.restore_text( params.get( 'field_%i' % index, '' ) ) @@ -643,10 +635,8 @@ class UsesFormDefinitions: else: #widget.value = util.restore_text( params.get( 'field_%i' % index, '' ) ) widget.value = util.restore_text( params.get( widget.name, '' ) ) - log.debug(">>>>>>>>>>>In edit_template_info, widget.value: %s" % str( widget.value )) # Save updated template field contents field_contents = self.clean_field_contents( widgets, **kwd ) - log.debug(">>>>>>>>>>>In edit_template_info, field_contents: %s" % str( field_contents )) if field_contents: if in_library: # In in a library, since information templates are inherited, the template fields can be displayed @@ -684,15 +674,10 @@ class UsesFormDefinitions: if info_association: template = info_association.template info = info_association.info - log.debug(">>>>>>>>>>>In edit_template_info, info: %s" % str( info )) - log.debug(">>>>>>>>>>>In edit_template_info, info.content: %s" % str( info.content )) form_values = trans.sa_session.query( trans.app.model.FormValues ).get( info.id ) - log.debug(">>>>>>>>>>>In edit_template_info, form_values.content 1: %s" % str( form_values.content )) # Update existing content only if it has changed flush_required = False for field_contents_key, field_contents_value in field_contents.items(): - log.debug(">>>>>>>>>>>In edit_template_info, field_contents_key: %s" % str( field_contents_key )) - log.debug(">>>>>>>>>>>In edit_template_info, field_contents_value: %s" % str( field_contents_value )) if field_contents_key in form_values.content: if form_values.content[ field_contents_key ] != field_contents_value: flush_required = True @@ -703,7 +688,6 @@ class UsesFormDefinitions: if flush_required: trans.sa_session.add( form_values ) trans.sa_session.flush() - log.debug(">>>>>>>>>>>In edit_template_info, form_values.content 2: %s" % str( form_values.content )) else: if in_library: # Inherit the next available info_association so we can get the template @@ -829,11 +813,7 @@ class UsesFormDefinitions: # Return True if any of the fields in widgets contain contents, widgets is a list of dictionaries that looks something like: # [{'widget': , 'helptext': 'Field 0 help (Optional)', 'label': 'Field 0'}] for i, field in enumerate( widgets ): - #log.debug("VVVVVVVV In widget_fields_have_contents, field: %s" % str( field )) - #log.debug("VVVVVVVV In widget_fields_have_contents, field[ 'widget' ]: %s" % str( field[ 'widget' ] )) - #log.debug("VVVVVVVV In widget_fields_have_contents, field[ 'widget' ].value: %s" % str( field[ 'widget' ].value )) if ( isinstance( field[ 'widget' ], TextArea ) or isinstance( field[ 'widget' ], TextField ) ) and field[ 'widget' ].value: - #log.debug("VVVVVVVV In widget_fields_have_contents, returning True...." ) return True if isinstance( field[ 'widget' ], SelectField ) and field[ 'widget' ].options: for option_label, option_value, selected in field[ 'widget' ].options: @@ -845,13 +825,10 @@ class UsesFormDefinitions: return True if isinstance( field[ 'widget' ], HistoryField ) and str( field[ 'widget' ].value ).lower() not in [ 'none' ]: return True - #log.debug("VVVVVVVV In widget_fields_have_contents, str( field[ 'widget' ].value ).lower(): *%s*" % str( str( field[ 'widget' ].value ).lower() )) if isinstance( field[ 'widget' ], AddressField ) and str( field[ 'widget' ].value ).lower() not in [ 'none' ]: return True return False def clean_field_contents( self, widgets, **kwd ): - log.debug("=====In clean_field_contents, widgets: %s" % str( widgets )) - log.debug("=====In clean_field_contents, kwd: %s" % str( kwd )) field_contents = {} for index, widget_dict in enumerate( widgets ): widget = widget_dict[ 'widget' ] @@ -863,12 +840,8 @@ class UsesFormDefinitions: # If the address was new, is has already been saved and widget.value is the new address.id value = widget.value field_contents[ widget.name ] = util.restore_text( value ) - log.debug("=====In clean_field_contents, returning field_contents: %s" % str( field_contents )) return field_contents def field_param_values_ok( self, widget_name, widget_type, **kwd ): - log.debug("++++++In field_param_values_ok, widget_name: %s" % str( widget_name )) - log.debug("++++++In field_param_values_ok, widget_type: %s" % str( widget_type )) - log.debug("++++++In field_param_values_ok, kwd: %s" % str( kwd )) # Make sure required fields have contents, etc params = util.Params( kwd ) if widget_type == 'AddressField': @@ -883,9 +856,6 @@ class UsesFormDefinitions: return False return True def save_widget_field( self, trans, field_obj, widget_name, **kwd ): - log.debug("<<<<<<<