def formstyle_table(form, fields, *args, **kwargs):
 def render_row(row_id, label, widget, comment, hidden=False):
  row = []
  _class = ('hide' if hidden else None)
  row.append(TR(TD(label, _class='w2p_fl'), TD(''), _id=(row_id + '1'), _class=_class))
  row.append(TR(widget, TD(comment, _class='w2p_fc'), _id=row_id, _class=_class))
  return tuple(row)
 if args:
  hidden = kwargs.get('hidden', False)
  return render_row(form, fields, args[0], args[1], hidden=hidden)
 else:
  parent = TABLE()
  for (row_id, label, widget, comment) in fields:
   rows = render_row(row_id, label, widget, comment)
   parent.append(rows[0])
   parent.append(rows[1])
  return parent

def formstyle_table ( form , fields , * args , ** kwargs ) : def render_row ( row_id , label , widget , comment , hidden = False ) : row = [ ] _class = ( 'hide' if hidden else None ) row . append ( TR ( TD ( label , _class = 'w2p_fl' ) , TD ( '' ) , _id = ( row_id + '1' ) , _class = _class ) ) row . append ( TR ( widget , TD ( comment , _class = 'w2p_fc' ) , _id = row_id , _class = _class ) ) return tuple ( row ) if args : hidden = kwargs . get ( 'hidden' , False ) return render_row ( form , fields , args [ 0 ] , args [ 1 ] , hidden = hidden ) else : parent = TABLE ( ) for ( row_id , label , widget , comment ) in fields : rows = render_row ( row_id , label , widget , comment ) parent . append ( rows [ 0 ] ) parent . append ( rows [ 1 ] ) return parent
old default eden form style - still used by ifrc .