diff --git a/CHANGES.rst b/CHANGES.rst index a1e0223f..06ab3a85 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,6 +23,11 @@ Bug fixes: - Related Items Widget: In search mode, when no basePath was set, search site-wide. Fixes: https://github.com/plone/mockup/issues/769 [thet] +- Fixes #64: SingleCheckBoxFieldWidget does not render value in view mode. + In order to fix this issue the hacky view was removed. + It is replaced by a new widget to render a single checkbox with bool values. + An appropiate data converter was added as well. + [jensens] 3.0 (2017-03-28) diff --git a/plone/app/z3cform/configure.zcml b/plone/app/z3cform/configure.zcml index eed91e28..d6394dd9 100644 --- a/plone/app/z3cform/configure.zcml +++ b/plone/app/z3cform/configure.zcml @@ -39,13 +39,6 @@ class=".templates.RenderContentProvider" permission="zope.Public" /> - @@ -99,9 +92,34 @@ /> + + + + +
- diff --git a/plone/app/z3cform/templates/singlecheckboxbool_display.pt b/plone/app/z3cform/templates/singlecheckboxbool_display.pt new file mode 100644 index 00000000..11d8004b --- /dev/null +++ b/plone/app/z3cform/templates/singlecheckboxbool_display.pt @@ -0,0 +1,21 @@ + + + + + diff --git a/plone/app/z3cform/templates/singlecheckboxbool_hidden.pt b/plone/app/z3cform/templates/singlecheckboxbool_hidden.pt new file mode 100644 index 00000000..df70d83b --- /dev/null +++ b/plone/app/z3cform/templates/singlecheckboxbool_hidden.pt @@ -0,0 +1,36 @@ + + + + + diff --git a/plone/app/z3cform/templates/singlecheckboxbool_input.pt b/plone/app/z3cform/templates/singlecheckboxbool_input.pt new file mode 100644 index 00000000..5502b6b4 --- /dev/null +++ b/plone/app/z3cform/templates/singlecheckboxbool_input.pt @@ -0,0 +1,86 @@ + + + + + + + + + diff --git a/plone/app/z3cform/templates/widget.pt b/plone/app/z3cform/templates/widget.pt index bbed5337..e1ba7984 100644 --- a/plone/app/z3cform/templates/widget.pt +++ b/plone/app/z3cform/templates/widget.pt @@ -14,7 +14,7 @@ id string:formfield-${widget/id};">