Commits

Brad Chapman committed 174181a

Provide consistent whitespace on text and textarea elements. Thanks to Anne Pajon

Comments (0)

Files changed (1)

lib/galaxy/web/form_builder.py

             return ''
     def get_required_str(self):
         if hasattr(self, "required") and self.required:
-            return 'class="required"'
+            return ' class="required"'
         else:
             return ""
 
         self.readonly = False
     def get_html( self, prefix="", disabled=False ):
         if self.readonly:
-            readonly = 'readonly="true"'
+            readonly = ' readonly="true"'
         else:
             readonly = ""
-        return '<input type="text" name="%s%s" size="%d" value="%s" %s %s %s>' \
+        return '<input type="text" name="%s%s" size="%d" value="%s"%s%s%s>' \
            % ( prefix, self.name, self.size, escape( str( self.value ), quote=True ),
                readonly, self.get_disabled_str( disabled ), self.get_required_str() )
     def set_size(self, size):
         self.cols = int(self.size[-1])
         self.value = value or ""
     def get_html( self, prefix="", disabled=False ):
-        return '<textarea %s name="%s%s" rows="%d" cols="%d"%s>%s</textarea>' \
+        return '<textarea%s name="%s%s" rows="%d" cols="%d"%s>%s</textarea>' \
                % ( self.get_required_str(), prefix, self.name, self.rows, self.cols,
                    self.get_disabled_str( disabled ), escape( str( self.value ), quote=True ) )
     def set_size(self, rows, cols):