Set empty label on boolean form fields
authorThierry Florac <tflorac@ulthar.net>
Mon, 07 Oct 2019 13:44:25 +0200
changeset 476 43aeb0631fd0
parent 475 de4f0a16b866
child 477 bf471dbff9b0
Set empty label on boolean form fields
src/pyams_default_theme/shared/form/__init__.py
--- a/src/pyams_default_theme/shared/form/__init__.py	Mon Oct 07 13:43:35 2019 +0200
+++ b/src/pyams_default_theme/shared/form/__init__.py	Mon Oct 07 13:44:25 2019 +0200
@@ -138,6 +138,8 @@
             else:
                 field = IFormFieldContainer(self.context).get(widget.field.__name__)
                 if field is not None:
+                    if field.field_type == 'bool':
+                        widget.label = ''
                     widget.placeholder = field.placeholder
 
     @button.buttonAndHandler('title', name='submit')