callable formstyle without wrapper, thanks Iceberg

This commit is contained in:
Massimo Di Pierro
2011-12-25 14:03:01 -06:00
parent dc91ed5e61
commit d424dfdd98
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2011-12-25 12:33:19) stable
Version 1.99.4 (2011-12-25 14:02:50) stable
+3 -3
View File
@@ -982,11 +982,11 @@ class SQLFORM(FORM):
table.append(LI(DIV(a,_class='w2p_fl'),
div_b,
DIV(c,_class='w2p_fc'),_id=id))
elif type(self.formstyle) == type(lambda:None):
elif callable(self.formstyle):
table = TABLE()
for id,a,b,c in xfields:
td_b = self.field_parent[id] = TD(b,_class='w2p_fw')
newrows = self.formstyle(id,a,td_b,c)
raw_b = self.field_parent[id] = b
newrows = self.formstyle(id,a,raw_b,c)
if type(newrows).__name__ != "tuple":
newrows = [newrows]
for newrow in newrows: