diff --git a/VERSION b/VERSION index 27f5ac32..3c554ef7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.10.0-trunk+timestamp.2014.08.19.18.56.57 +Version 2.10.0-trunk+timestamp.2014.08.20.21.25.43 diff --git a/applications/welcome/models/db.py b/applications/welcome/models/db.py index c76de47c..932a7a60 100644 --- a/applications/welcome/models/db.py +++ b/applications/welcome/models/db.py @@ -25,11 +25,9 @@ else: ## by default give a view/generic.extension to all actions from localhost ## none otherwise. a pattern can be 'controller/function.extension' response.generic_patterns = ['*'] if request.is_local else [] -if request.vars.h: - from gluon.sqlhtml import formstyle_bootstrap3_horizontal - response.formstyle = formstyle_bootstrap3_horizontal(3) -else: - response.formstyle = 'bootstrap3' +## choose a style for forms +response.formstyle = 'bootstrap3_inline' # or 'bootstrap3_stacked' or 'bootstrap2' or other + ## (optional) optimize handling of static files # response.optimize_css = 'concat,minify,inline' # response.optimize_js = 'concat,minify,inline' diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 4d5ee8cd..0ef3ae28 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -822,7 +822,7 @@ def formstyle_bootstrap(form, fields): return parent -def formstyle_bootstrap3(form, fields): +def formstyle_bootstrap3_stacked(form, fields): """ bootstrap 3 format form layout Note: @@ -865,7 +865,7 @@ def formstyle_bootstrap3(form, fields): return parent -def formstyle_bootstrap3_horizontal(col_label_size=3): +def formstyle_bootstrap3_inline_factory(col_label_size=3): """ bootstrap 3 horizontal form layout Note: @@ -1001,9 +1001,10 @@ class SQLFORM(FORM): divs=formstyle_divs, ul=formstyle_ul, bootstrap=formstyle_bootstrap, - bootstrap3=formstyle_bootstrap3, + bootstrap3_stacked=formstyle_bootstrap3_stacked, + bootstrap3_inline=formstyle_bootstrap3_inline_factory(3), inline=formstyle_inline, - ) + ) FIELDNAME_REQUEST_DELETE = 'delete_this_record' FIELDKEY_DELETE_RECORD = 'delete_record'