Added missing object data attributes
authorThierry Florac <tflorac@ulthar.net>
Fri, 21 Dec 2018 20:09:04 +0100
changeset 172 bb46db6d5f8a
parent 171 5ed2f996fe37
child 173 9f092b6dfd28
Added missing object data attributes
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/inner-form.pt	Fri Dec 21 09:30:29 2018 +0100
+++ b/src/pyams_form/interfaces/templates/inner-form.pt	Fri Dec 21 20:09:04 2018 +0100
@@ -89,6 +89,7 @@
 								<div tal:attributes="class widget.input_css_class | group.input_css_class | view.input_css_class">
 									<div class="input"
 										 tal:attributes="class widget.widget_css_class | default;
+														 data-ams-data tales:object_data(widget);
 														 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
 										<div tal:define="notice widget.before_widget_notice | nothing"
 											 tal:condition="notice"
--- a/src/pyams_form/interfaces/templates/widget-form.pt	Fri Dec 21 09:30:29 2018 +0100
+++ b/src/pyams_form/interfaces/templates/widget-form.pt	Fri Dec 21 20:09:04 2018 +0100
@@ -84,6 +84,7 @@
 										<div tal:attributes="class widget.input_css_class | group.input_css_class | view.input_css_class">
 											<div class="input"
 												 tal:attributes="class widget.widget_css_class | default;
+																 data-ams-data tales:object_data(widget);
 																 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
 												<div tal:define="notice widget.before_widget_notice | nothing"
 													 tal:condition="notice"
--- a/src/pyams_form/widget/templates/object-subform.pt	Fri Dec 21 09:30:29 2018 +0100
+++ b/src/pyams_form/widget/templates/object-subform.pt	Fri Dec 21 20:09:04 2018 +0100
@@ -21,7 +21,8 @@
 					<div class="col-md-9"
 						 tal:attributes="class widget/input_css_class | group/input_css_class | view/input_css_class | default">
 						<div class="input"
-							 tal:attributes="class widget/widget_css_class | default;">
+							 tal:attributes="class widget/widget_css_class | default;
+											 data-ams-data tales:object_data(widget);">
 							<input tal:replace="structure python:widget.render()" />
 						</div>
 					</div>