Added "widget_title" viewlet to form's header (if requested explicitly)
authorThierry Florac <thierry.florac@onf.fr>
Wed, 22 Jul 2015 16:58:25 +0200
changeset 22 37a759137db5
parent 21 47af200bdaf4
child 23 1f37525298da
Added "widget_title" viewlet to form's header (if requested explicitly)
src/pyams_form/templates/form.pt
src/pyams_form/templates/inner-form.pt
--- a/src/pyams_form/templates/form.pt	Wed Jul 01 10:11:48 2015 +0200
+++ b/src/pyams_form/templates/form.pt	Wed Jul 22 16:58:25 2015 +0200
@@ -35,6 +35,8 @@
 							tal:condition="legend">
 						<i tal:attributes="class view.icon_css_class | nothing"></i>
 						<tal:var content="legend">Legend</tal:var>
+						<tal:var condition="python:getattr(view, 'show_widget_title', False)"
+								 content="structure provider:pyams.widget_title" />
 					</legend>
 					<tal:var content="structure provider:content_help" />
 					<div class="widgets-prefix"
--- a/src/pyams_form/templates/inner-form.pt	Wed Jul 01 10:11:48 2015 +0200
+++ b/src/pyams_form/templates/inner-form.pt	Wed Jul 22 16:58:25 2015 +0200
@@ -26,6 +26,8 @@
 			<legend class="inner" tal:condition="legend">
 				<i tal:attributes="class view.icon_css_class | nothing"></i>
 				<tal:var content="legend">Legend</tal:var>
+				<tal:var condition="python:getattr(view, 'show_widget_title', False)"
+						 content="structure provider:pyams.widget_title" />
 			</legend>
 			<tal:var content="structure provider:content_help" />
 			<div class="widgets-prefix"