Updated portlet configuration template
authorThierry Florac <tflorac@ulthar.net>
Sat, 27 Jan 2018 00:22:30 +0100
changeset 55 f65d44489af0
parent 54 61b12214c939
child 56 5401c182532e
Updated portlet configuration template
src/pyams_portal/zmi/templates/portlet.pt
--- a/src/pyams_portal/zmi/templates/portlet.pt	Sun Jan 14 14:46:58 2018 +0100
+++ b/src/pyams_portal/zmi/templates/portlet.pt	Sat Jan 27 00:22:30 2018 +0100
@@ -98,8 +98,8 @@
 										   tal:condition="widget.mode == 'hidden'"
 										   tal:replace="structure widget.render()" />
 									<tal:if condition="widget.mode != 'hidden'">
-										<div tal:define="required 'required-field' if widget.required and (widget.mode != 'display') else ''"
-											 tal:attributes="class string:form-group ${required}">
+										<div tal:define="required 'required-field' if widget.required and widget.label and (widget.mode != 'display') else ''"
+											 tal:attributes="class string:${widget.group_css_class | group.group_css_class | view.group_css_class | 'form-group'} ${required}">
 											<label tal:attributes="class widget.label_css_class | group.label_css_class | view.label_css_class">
 												<span>
 													<tal:var content="widget.label" />
@@ -114,7 +114,13 @@
 												<label class="input"
 													   tal:attributes="class widget.widget_css_class | default;
 																	   data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+													<div tal:define="notice widget.before_widget_notice | nothing"
+														 tal:condition="notice"
+														 tal:content="structure notice">Notice</div>
 													<input tal:replace="structure widget.render()" />
+													<div tal:define="notice widget.after_widget_notice | nothing"
+														 tal:condition="notice"
+														 tal:content="structure notice">Notice</div>
 												</label>
 											</div>
 										</div>
@@ -140,7 +146,7 @@
 							 tal:condition="view.subforms">
 							<fieldset tal:define="title view.subforms_legend"
 									  tal:omit-tag="not:title">
-								<legend tal:condition="title" tal:content="title" i18n:translate="">Title</legend>
+								<legend tal:condition="title" tal:content="title" i18n:translate="">Legend</legend>
 								<tal:loop repeat="subform view.subforms">
 									<tal:var replace="structure subform.render()" />
 								</tal:loop>