[web2py] Bootstrap 3 datepicker
Hello. I'm trying to use Bootstrap 3 datepicker. http://eonasdan.github.io/bootstrap-datetimepicker/ Edward have already use it: https://groups.google.com/d/topic/web2py/ZRS6PN-Ais4/discussion I use it for datetime, the result in the input is like: 03/09/2016 14:00 The form returns me an error as it need also the seconds like: 03/09/2016 14:00:00 The seconds for this application are not important, it could be a solution appending :00 to the input. Someone knows how I can resolve it? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] bootstrap 3?
Hi, I'm creating a web app by using the welcome app as a template - there's an external theme, HTML, etc. I want to use which seems to be using Bootstrap 3. Web2py had bootstrap3 support sometime in 2014, but it seemed to have been reverted in favour of an early release amid discussion whether the implementation was good. So, as a user...there are a few natural questions. I looked and while there are answers around, not sure how applicable they are to 2.9.12-release. I know some of these questions might not make sense, I'm still at the investigation phase. The assumption is, I would not need to use the view part of the welcome app, but would pretty much want to retain the default models and controllers as a template. 1. with the above assumption, what would I be missing and are they mostly on the view side? (e.g. would {{=response.toolbar()}} work?) 2. if I want to continue to use most gluon facilities, approximately how much of that would work with BS3? 3. is there something I would absolutely need to copy from the welcome app's view part? Thanks! Michael -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Bootstrap 3 custom forms
Hi Using custom forms and trying to work with bootstrap three. I'm using SQLFORM.grid() and then modifying the view using form.custom.begin. The form tag in the html is still generated as: instead of the form tag that is generated when you use SQLFORM.grid without a custom view: Here is the SQLFORM.grid() call: grid = SQLFORM.grid(query, fields=fields, orderby=orderby, create=create, details=details, editable=editable, deletable=deletable, csv=False, search_widget=defaultSearch, paginate=15, maxtextlength=45, formname='userForm', formstyle=my_formstyle, ui=grid_ui) my_formstyle is: def my_formstyle(form, fields): col_sm_label_size = 4 col_md_label_size = 3 form.add_class('form-horizontal col-sm-9 col-md-7 col-lg-5') label_col_class = "col-sm-%d col-md-%d" % (col_sm_label_size, col_md_label_size) col_class = "col-sm-%d col-md-%d" % ((12 - col_sm_label_size), (12 - col_md_label_size)) offset_class = "col-sm-offset-%d col-md-offset-%s" % (col_sm_label_size, col_md_label_size) parent = CAT() for id, label, controls, help in fields: # wrappers _help = SPAN(help, _class='help-block') # embed _help into _controls _controls = DIV(controls, _help, _class=col_class) if isinstance(controls, INPUT): if controls['_type'] == 'submit': controls.add_class('btn btn-primary') _controls = DIV(controls, _class="%s %s" % (col_class, offset_class)) if controls['_type'] == 'button': controls.add_class('btn btn-default') elif controls['_type'] == 'file': controls.add_class('input-file') elif controls['_type'] == 'text': controls.add_class('form-control') elif controls['_type'] == 'email': controls.add_class('form-control') elif controls['_type'] == 'password': controls.add_class('form-control') elif controls['_type'] == 'checkbox': label['_for'] = None label.insert(0, controls) _controls = DIV(DIV(label, _help, _class="checkbox"), _class="%s %s" % (offset_class, col_class)) label = '' elif isinstance(controls, SELECT): controls.add_class('form-control') elif isinstance(controls, TEXTAREA): controls.add_class('form-control') elif isinstance(controls, SPAN): _controls = P(controls.components, _class="form-control-static %s" % col_class) if isinstance(label, LABEL): label['_class'] = 'control-label %s' % label_col_class parent.append(DIV(label, _controls, _class='form-group', _id=id)) return parent and grid_ui is: grid_ui = dict(widget='', header='', content='', default='', cornerall='', cornertop='', cornerbottom='', button='btn btn-default button', buttontext='buttontext button', buttonadd='glyphicon glyphicon-plus space-after', buttonback='glyphicon glyphicon-arrow-left space-after', buttonexport='glyphicon glyphicon-download space-after', buttondelete='glyphicon glyphicon-trash space-after', buttonedit='glyphicon glyphicon-pencil space-after', buttontable='glyphicon glyphicon-arrow-right space-after', buttonview='glyphicon glyphicon-arrow-zoom-in space-after') Any pointers on where to look to get the form.custom.begin to generate the same form tag as SQLFORM.grid()? -Jim -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] bootstrap 3 - if you care help test trunk now
Bootstrap 3 is in trunk now. Please help us test it. Also help us test that existing apps are not broken. Massimo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Bootstrap 3
Any plan to embed Bootstrap 3 into web2py ? Greg -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Bootstrap 3 custom checkbox widget
I have the following custom checkboxes widget: def bs3checkboxeswidget(field, value, **attributes): if isinstance(value, (list, tuple)): values = [str(v) for v in value] else: values = [str(value)] attr = OptionsWidget._attributes(field, {}, **attributes) attr['_class'] = attr.get('_class', 'web2py_checkboxeswidget') requires = field.requires if not isinstance(requires, (list, tuple)): requires = [requires] if requires and hasattr(requires[0], 'options'): options = requires[0].options() else: raise SyntaxError('widget cannot determine options of %s' % field) options = [(k, v) for k, v in options if k != ''] opts = [] for k, v in options: if k in values: r_value = k else: r_value = [] opts.append(LABEL(v, INPUT(_type='checkbox', _id='%s%s' % (field.name, k), _name=field.name, requires=attr.get('requires', None), hideerror=True, _value=k, value=r_value), _for='%s%s' % (field.name, k))) if opts: opts.append( INPUT(requires=attr.get('requires', None), _style="display:none;", _disabled="disabled", _name=field.name, hideerror=False)) return TAG[''](*opts, **attr) It generates: opening_hours event_list timetable I want this to be enclosed by a div opening_hours event_list timetable How do I code this? Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] bootstrap 3 skeleton app?
hi there, is there available anywhere yet a web2py skeleton app with bootstrap 3 integrated? thanks, e. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] bootstrap 3
just to inform everybody that 3.0 is coming out http://twitter.github.io/bootstrap/ -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.