equal
deleted
inserted
replaced
23 from warnings import warn |
23 from warnings import warn |
24 |
24 |
25 from logilab.common import dictattr |
25 from logilab.common import dictattr |
26 from logilab.mtconverter import xml_escape |
26 from logilab.mtconverter import xml_escape |
27 |
27 |
28 try: |
|
29 from json import dumps |
|
30 except ImportError: |
|
31 from simplejson import dumps |
|
32 |
|
33 from cubicweb import tags |
28 from cubicweb import tags |
34 from cubicweb.appobject import AppObject |
29 from cubicweb.appobject import AppObject |
35 from cubicweb.selectors import implements, yes |
30 from cubicweb.selectors import implements, yes |
36 from cubicweb.web import eid_param, formwidgets as fwdgs |
31 from cubicweb.web import dumps, eid_param, formwidgets as fwdgs |
37 |
32 |
38 |
33 |
39 def checkbox(name, value, attrs='', checked=None): |
34 def checkbox(name, value, attrs='', checked=None): |
40 if checked is None: |
35 if checked is None: |
41 checked = value |
36 checked = value |