Updated checkbox template
authorThierry Florac <thierry.florac@onf.fr>
Tue, 10 Jul 2018 13:30:12 +0200
changeset 127 7cf5f2951a39
parent 126 c915b68a4a52
child 128 26852816c2c2
Updated checkbox template
src/pyams_form/widget/templates/checkbox-input.pt
--- a/src/pyams_form/widget/templates/checkbox-input.pt	Mon Jul 09 13:40:22 2018 +0200
+++ b/src/pyams_form/widget/templates/checkbox-input.pt	Tue Jul 10 13:30:12 2018 +0200
@@ -1,8 +1,9 @@
-<i18n:var>
-	<label class="checkbox" tal:define="items view/items">
-		<input name="field-empty-marker" type="hidden" value="1"
-				tal:attributes="name string:${view/name}-empty-marker" />
-		<tal:loop repeat="item items">
+<i18n:var i18n:domain="pyams_form">
+	<input name="field-empty-marker" type="hidden" value="1"
+			tal:attributes="name string:${view/name}-empty-marker" />
+	<tal:loop define="items view/items"
+			  repeat="item items">
+		<label class="checkbox">
 			<input type="checkbox" id="" name="" class="" alt="" title=""
 				   tabindex="" disabled="" readonly="" accesskey="" value=""
 				   checked="checked"
@@ -64,6 +65,6 @@
 								accesskey view/accesskey;
 								onselect view/onselect" />
 			<i></i><span tal:replace="python:request.localizer.translate(item['label'])">Label</span>
-		</tal:loop>
-	</label>
+		</label>
+	</tal:loop>
 </i18n:var>