mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix for params_to_incoming.
This commit is contained in:
@@ -115,5 +115,5 @@ def params_to_incoming( incoming, inputs, input_values, app, name_prefix="" ):
|
||||
incoming[ new_name_prefix + input.test_param.name ] = values[ input.test_param.name ]
|
||||
params_to_incoming( incoming, input.cases[current].inputs, values, app, new_name_prefix )
|
||||
else:
|
||||
incoming[ name_prefix + input.name ] = input.to_string( input_values.get( input.name ), app )
|
||||
incoming[ name_prefix + input.name ] = input.to_html_value( input_values.get( input.name ), app )
|
||||
|
||||
|
||||
@@ -106,6 +106,10 @@ class ToolParameter( object ):
|
||||
"""
|
||||
return value
|
||||
|
||||
def to_html_value( self, value, app ):
|
||||
"""Convert an object value to the value expected from an html post"""
|
||||
return self.to_string( value, app )
|
||||
|
||||
def to_string( self, value, app ):
|
||||
"""Convert a value to a string representation suitable for persisting"""
|
||||
return str( value )
|
||||
@@ -370,6 +374,11 @@ class BooleanToolParameter( ToolParameter ):
|
||||
return form_builder.CheckboxField( self.name, checked, refresh_on_change = self.refresh_on_change )
|
||||
def from_html( self, value, trans=None, other_values={} ):
|
||||
return form_builder.CheckboxField.is_checked( value )
|
||||
def to_html_value( self, value, app ):
|
||||
if value:
|
||||
return [ 'true', 'true' ]
|
||||
else:
|
||||
return [ 'true' ]
|
||||
def to_python( self, value, app ):
|
||||
return ( value == 'True' )
|
||||
def get_initial_value( self, trans, context ):
|
||||
|
||||
Reference in New Issue
Block a user