Updated checkbox widget display template
authorThierry Florac <tflorac@ulthar.net>
Fri, 01 Feb 2019 17:41:11 +0100
changeset 175 389644f0e684
parent 174 fb93338172a6
child 176 e9de5679c66f
Updated checkbox widget display template
src/pyams_form/widget/templates/checkbox-display.pt
--- a/src/pyams_form/widget/templates/checkbox-display.pt	Fri Dec 28 10:55:17 2018 +0100
+++ b/src/pyams_form/widget/templates/checkbox-display.pt	Fri Feb 01 17:41:11 2019 +0100
@@ -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">
+	<tal:loop define="items view/items"
+			  repeat="item items">
+		<label class="checkbox">
+			<input name="field-empty-marker" type="hidden" value="1"
+					tal:attributes="name string:${view/name}-empty-marker" />
 			<input type="checkbox" id="" name="" class="" alt="" title=""
 				   tabindex="" accesskey="" value="" disabled
 				   checked="checked"
@@ -60,6 +61,6 @@
 								accesskey view/accesskey;
 								onselect view/onselect" />
 			<i></i><span tal:replace="python:request.localizer.translate(item['label'])" i18n:translate="">Label</span>
-		</tal:loop>
-	</label>
+		</label>
+	</tal:loop>
 </i18n:var>