Added option to remove div containing widgets prefix viewlets
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Oct 2017 09:02:41 +0200
changeset 67 9c2648bc7076
parent 66 b4ebe523bb4e
child 68 397c6a042106
Added option to remove div containing widgets prefix viewlets
src/pyams_form/templates/form.pt
src/pyams_form/templates/inner-form.pt
src/pyams_form/templates/widget-form.pt
--- a/src/pyams_form/templates/form.pt	Thu Sep 21 14:29:32 2017 +0200
+++ b/src/pyams_form/templates/form.pt	Fri Oct 13 09:02:41 2017 +0200
@@ -49,6 +49,7 @@
 					</legend>
 					<tal:var content="structure provider:form_help" />
 					<div class="widgets-prefix"
+						 tal:omit-tag="getattr(view, 'hide_widgets_prefix_div', False)"
 						 tal:define="prefix provider:widgets_prefix"
 						 tal:condition="prefix"
 						 tal:content="structure prefix">Widgets prefix</div>
@@ -120,6 +121,7 @@
 						</div>
 					</tal:loop>
 					<div class="widgets-suffix"
+						 tal:omit-tag="getattr(view, 'hide_widgets_suffix_div', False)"
 						 tal:define="suffix provider:widgets_suffix"
 						 tal:condition="suffix"
 						 tal:content="structure suffix">Widgets suffix</div>
--- a/src/pyams_form/templates/inner-form.pt	Thu Sep 21 14:29:32 2017 +0200
+++ b/src/pyams_form/templates/inner-form.pt	Fri Oct 13 09:02:41 2017 +0200
@@ -37,6 +37,7 @@
 			</legend>
 			<tal:var content="structure provider:form_help" />
 			<div class="widgets-prefix"
+				 tal:omit-tag="getattr(view, 'hide_widgets_prefix_div', False)"
 				 tal:define="prefix provider:widgets_prefix"
 				 tal:condition="prefix"
 				 tal:content="structure prefix">Widgets prefix</div>
@@ -107,6 +108,7 @@
 				</div>
 			</tal:loop>
 			<div class="widgets-suffix"
+				 tal:omit-tag="getattr(view, 'hide_widgets_suffix_div', False)"
 				 tal:define="suffix provider:widgets_suffix"
 				 tal:condition="suffix"
 				 tal:content="structure suffix">Widgets suffix</div>
--- a/src/pyams_form/templates/widget-form.pt	Thu Sep 21 14:29:32 2017 +0200
+++ b/src/pyams_form/templates/widget-form.pt	Fri Oct 13 09:02:41 2017 +0200
@@ -31,6 +31,7 @@
 			<div class="modal-viewport">
 				<fieldset>
 					<div class="widgets-prefix"
+						 tal:omit-tag="getattr(view, 'hide_widgets_prefix_div', False)"
 						 tal:define="prefix provider:widgets_prefix"
 						 tal:condition="prefix"
 						 tal:content="structure prefix">Widgets prefix</div>
@@ -101,6 +102,7 @@
 						</fieldset>
 					</tal:loop>
 					<div class="widgets-suffix"
+						 tal:omit-tag="getattr(view, 'hide_widgets_suffix_div', False)"
 						 tal:define="suffix provider:widgets_suffix"
 						 tal:condition="suffix"
 						 tal:content="structure suffix">Widgets suffix</div>