details: http://www.bx.psu.edu/hg/galaxy/rev/445986a09dbb changeset: 3362:445986a09dbb user: rc date: Tue Feb 09 15:05:39 2010 -0500 description: Removed NumberField from form_builder diffstat: lib/galaxy/model/__init__.py | 3 --- lib/galaxy/web/form_builder.py | 21 +-------------------- templates/admin/requests/show_request.mako | 2 -- templates/requests/show_request.mako | 2 -- 4 files changed, 1 insertions(+), 27 deletions(-) diffs (75 lines): diff -r 606686b073f3 -r 445986a09dbb lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Tue Feb 09 13:40:01 2010 -0500 +++ b/lib/galaxy/model/__init__.py Tue Feb 09 15:05:39 2010 -0500 @@ -1267,9 +1267,6 @@ if field[ 'type' ] == 'TextField': field_widget.set_size( 40 ) field_widget.value = value - if field[ 'type' ] == 'NumberField': - field_widget.set_size( 40 ) - field_widget.value = value elif field[ 'type' ] == 'TextArea': field_widget.set_size( 3, 40 ) field_widget.value = value diff -r 606686b073f3 -r 445986a09dbb lib/galaxy/web/form_builder.py --- a/lib/galaxy/web/form_builder.py Tue Feb 09 13:40:01 2010 -0500 +++ b/lib/galaxy/web/form_builder.py Tue Feb 09 15:05:39 2010 -0500 @@ -12,7 +12,7 @@ raise TypeError( "Abstract Method" ) @staticmethod def form_field_types(): - return ['TextField', 'NumberField', 'TextArea', 'SelectField', 'CheckboxField', 'AddressField'] + return ['TextField', 'TextArea', 'SelectField', 'CheckboxField', 'AddressField'] class TextField(BaseField): """ @@ -51,25 +51,6 @@ % ( prefix, self.name, self.size, escape(str(self.value), quote=True) ) def set_size(self, size): self.size = int( size ) - -class NumberField(BaseField): - """ - A number input box. - - >>> print NumberField( "foo" ).get_html() - <input type="int" name="foo" size="10" value=""> - >>> print NumberField( "bins", size=4, value="12345" ).get_html() - <input type="int" name="bins" size="4" value="12345"> - """ - def __init__( self, name, size=None, value=None ): - self.name = name - self.size = int( size or 10 ) - self.value = value or "" - def get_html( self, prefix="" ): - return '<input type="int" name="%s%s" size="%d" value="%s">' \ - % ( prefix, self.name, self.size, escape(str(self.value), quote=True) ) - def set_size(self, size): - self.size = int( size ) class TextArea(BaseField): """ diff -r 606686b073f3 -r 445986a09dbb templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Tue Feb 09 13:40:01 2010 -0500 +++ b/templates/admin/requests/show_request.mako Tue Feb 09 15:05:39 2010 -0500 @@ -226,8 +226,6 @@ </select> %elif field['type'] == 'CheckboxField': <input type="checkbox" name="sample_${index}_field_${field_index}" value="Yes"/> - %elif field['type'] == 'NumberField': - <input type="int" name="sample_${index}_field_${field_index}" value="${sample_values[field_index]}" size="7"/> %endif <div class="toolParamHelp" style="clear: both;"> <i>${'('+field['required']+')' }</i> diff -r 606686b073f3 -r 445986a09dbb templates/requests/show_request.mako --- a/templates/requests/show_request.mako Tue Feb 09 13:40:01 2010 -0500 +++ b/templates/requests/show_request.mako Tue Feb 09 15:05:39 2010 -0500 @@ -214,8 +214,6 @@ </select> %elif field['type'] == 'CheckboxField': <input type="checkbox" name="sample_${index}_field_${field_index}" value="Yes"/> - %elif field['type'] == 'NumberField': - <input type="int" name="sample_${index}_field_${field_index}" value="${sample_values[field_index]}" size="7"/> %endif <div class="toolParamHelp" style="clear: both;"> <i>${'('+field['required']+')' }</i>