readonly form fields

9 views
Skip to first unread message

Annet

unread,
May 21, 2015, 11:41:38 AM5/21/15
to web...@googlegroups.com
I have formstyle set to boostrap3_stacked, in case of a readonly field
these fields are rendered rather ugly. I added the following line of
code to the formstyle_bootstrap3_stacked(form, fields) function


if isinstance(controls, basestring) or isinstance(controls, int):
            _controls = DIV(controls, _class='form-control', _readonly=True)

this partially solves my problem, in case of
IS_IN_SET([(1, 'pending'), (2, 'accepted'), (3, 'blocked')]) the fields containing,
1, 2 or 3 are still rendered ugly.

Why doesn't isinstance(controls, int) take of rendering them readonly.


Kind regards,

Annet
Reply all
Reply to author
Forward
0 new messages