Updated object sub-form template
authorThierry Florac <thierry.florac@onf.fr>
Fri, 21 Dec 2018 09:30:29 +0100
changeset 171 5ed2f996fe37
parent 170 937cb818fcdc
child 172 bb46db6d5f8a
Updated object sub-form template
src/pyams_form/widget/templates/object-subform.pt
--- a/src/pyams_form/widget/templates/object-subform.pt	Thu Dec 20 14:21:31 2018 +0100
+++ b/src/pyams_form/widget/templates/object-subform.pt	Fri Dec 21 09:30:29 2018 +0100
@@ -10,9 +10,9 @@
 					<label class="control-label col-md-3"
 						   tal:attributes="class widget/label_css_class | group/label_css_class | view/label_css_class | default">
 						<span>
-							<tal:var content="widget/label" />
+							<tal:var content="python:request.localizer.translate(widget.label)" />
 							<i class="fa fa-question-circle hint" title="Input hint"
-							   tal:define="description getattr(widget, 'description', None) or widget.field.description"
+							   tal:define="description python:getattr(widget, 'description', None) or widget.field.description"
 							   tal:condition="description"
 							   tal:attributes="title description;
 											   data-ams-hint-html python:'<' in description;"></i>