[web2py] Re: How to use twitter bootstrap style

2014-02-25 Thread Annet
> How do you add the data toggle, data target, etc. as well? > I had the same problem, Anthony helped me solve it: See the end of this section in the book: http://web2py.com/books/default/chapter/29/05#HTML-helpers And specifically for "data-*" attributes, you can now do: form.element('inp

[web2py] Re: How to use twitter bootstrap style

2014-02-24 Thread Jessica Le
How do you add the data toggle, data target, etc. as well? For example: form.element(_type='submit')(['_class']='btn btn-default',['_data-toggle']='modal',['_data-target']='.bs-example-modal-lg') but that doesn't work... On Friday, July 6, 2012 12:06:30 PM UTC-5, Annet wrote: > > To change

[web2py] Re: How to use twitter bootstrap style

2012-07-06 Thread Annet
To change the value of a button, this should work: form.element(_type='submit')['_value']='Login' To add the info button: form[0][-1][1].append(INPUT(_type="button",_value="Info",_onclick="document.location='%s'" %URL('function'))) To add the classes: form.element(_type='submit')['_class']='

[web2py] Re: How to use twitter bootstrap style

2012-07-06 Thread orsomannaro
Il 06/07/2012 10:31, orsomannaro ha scritto: In a SQLFORM form I set: buttons = [ INPUT(_type='submit', _value='go', _class='btn btn-primary'), INPUT(_type='button', _value='info', _class='btn btn-info'), ] but buttons have not bootstrap style (btn-primary button are not blue, there are no

Re: [web2py] Re: How to use twitter bootstrap style

2012-07-06 Thread orsomannaro
Il 06/07/2012 12:11, stefaan ha scritto: Not sure if it would solve your problem, but sometimes you need to clear the browser cache to see the effect of changes in css. yes, but this is not my case. tnk

Re: [web2py] Re: How to use twitter bootstrap style

2012-07-06 Thread stefaan
> > > and this change a lot of things but not buttons style, so I think that's > not the corrects way ... > Not sure if it would solve your problem, but sometimes you need to clear the browser cache to see the effect of changes in css.

Re: [web2py] Re: How to use twitter bootstrap style

2012-07-06 Thread orsomannaro
Il 06/07/2012 10:52, Annet ha scritto: This works for me: but not for me :( my web2py_ajax.html (I tried several changes): ... {{ response.files.insert(0,URL('static','js/jquery.js')) response.files.insert(1,URL('static','css/calendar.css')) response.files.insert(2,URL('static','js/calendar.

[web2py] Re: How to use twitter bootstrap style

2012-07-06 Thread Annet
This works for me: In web2py_ajax.html: response.files.insert(3,URL('static','js/bootstrap.min.js')) response.files.insert(4,URL('static','css/bootstrap.min.css')) and in the function: form=SQLFORM(..) form.element(_type='submit')['_class']='btn btn-primary' form.element(_type='button')['_class