Updated forms templates
authorThierry Florac <tflorac@ulthar.net>
Wed, 17 Oct 2018 16:10:30 +0200
changeset 154 92688225ec40
parent 153 678b41b062ea
child 155 42c7d16e01fc
Updated forms templates
src/pyams_form/interfaces/templates/form.pt
src/pyams_form/interfaces/templates/inner-form.pt
src/pyams_form/interfaces/templates/widget-form.pt
src/pyams_form/widget/templates/object-subform.pt
--- a/src/pyams_form/interfaces/templates/form.pt	Fri Oct 12 15:04:40 2018 +0200
+++ b/src/pyams_form/interfaces/templates/form.pt	Wed Oct 17 16:10:30 2018 +0200
@@ -96,7 +96,7 @@
 											<span>
 												<tal:var content="widget.label" />
 												<i class="fa fa-question-circle hint" title="Input hint"
-												   tal:define="description getattr(widget, 'description', widget.field.description)"
+												   tal:define="description getattr(widget, 'description', None) or widget.field.description"
 												   tal:condition="description"
 												   tal:attributes="title description;
 																   data-ams-hint-html '<' in description;"></i>
--- a/src/pyams_form/interfaces/templates/inner-form.pt	Fri Oct 12 15:04:40 2018 +0200
+++ b/src/pyams_form/interfaces/templates/inner-form.pt	Wed Oct 17 16:10:30 2018 +0200
@@ -80,7 +80,7 @@
 									<span>
 										<tal:var content="widget.label" />
 										<i class="fa fa-question-circle hint" title="Input hint"
-										   tal:define="description getattr(widget, 'description', widget.field.description)"
+										   tal:define="description getattr(widget, 'description', None) or widget.field.description"
 										   tal:condition="description"
 										   tal:attributes="title description;
 														   data-ams-hint-html '<' in description;"></i>
--- a/src/pyams_form/interfaces/templates/widget-form.pt	Fri Oct 12 15:04:40 2018 +0200
+++ b/src/pyams_form/interfaces/templates/widget-form.pt	Wed Oct 17 16:10:30 2018 +0200
@@ -75,7 +75,7 @@
 											<span>
 												<tal:var content="widget.label" />
 												<i class="fa fa-question-circle hint" title="Input hint"
-												   tal:define="description getattr(widget, 'description', widget.field.description)"
+												   tal:define="description getattr(widget, 'description', None) or widget.field.description"
 												   tal:condition="description"
 												   tal:attributes="title description;
 																   data-ams-hint-html '<' in description;"></i>
--- a/src/pyams_form/widget/templates/object-subform.pt	Fri Oct 12 15:04:40 2018 +0200
+++ b/src/pyams_form/widget/templates/object-subform.pt	Wed Oct 17 16:10:30 2018 +0200
@@ -12,7 +12,7 @@
 						<span>
 							<tal:var content="widget/label" />
 							<i class="fa fa-question-circle hint" title="Input hint"
-							   tal:define="description python:getattr(widget, 'description', widget.field.description)"
+							   tal:define="description getattr(widget, 'description', None) or widget.field.description"
 							   tal:condition="description"
 							   tal:attributes="title description;
 											   data-ams-hint-html python:'<' in description;"></i>