Seems that bootstrap broke in latest trunk. All my forms, which use
bootstrap are returning errors... commenting formstyle='bootstrap' makes it
work fine.
Traceback (most recent call last):
File "/Users/adnan/web2py24/gluon/restricted.py", line 212, in restricted
exec ccode in environment
File
"/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/dev_thanemobile/controllers/default.py>,
line 2004, in <module>
File "/Users/adnan/web2py24/gluon/globals.py", line 193, in <lambda>
self._caller = lambda f: f()
File
"/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/dev_thanemobile/controllers/default.py>,
line 1946, in inquire
formstyle='bootstrap', )
File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1580, in factory
**attributes)
File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1200, in __init__
table = self.createform(xfields)
File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1224, in createform
table = formstyle(self, xfields)
File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 768, in
formstyle_bootstrap
form['_class'] += ' form-horizontal'
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
Function argument list
(form=<gluon.sqlhtml.SQLFORM object>,
fields=[('no_table_email_address__row', <gluon.html.LABEL object>,
<gluon.html.INPUT object>, ''), ('no_table_ext_order__row',
<gluon.html.LABEL object>, <gluon.html.INPUT object>, ''),
('submit_record__row', '', <gluon.html.DIV object>, '')])
Code listing
763.
764.
765.
766.
767.
768.
769.
770.
771.
772.
return table
def formstyle_bootstrap(form, fields):
''' bootstrap format form layout '''
form['_class'] += ' form-horizontal'
parent = FIELDSET()
for id, label, controls, help in fields:
# wrappers
_help = SPAN(help, _class='help-inline')
Variables form <gluon.sqlhtml.SQLFORM object>
--