Updated widgets templates
authorThierry Florac <tflorac@ulthar.net>
Wed, 28 Aug 2019 18:06:20 +0200
changeset 184 848706a5100d
parent 183 68d1914411ab
child 185 8030eca2abf3
Updated widgets templates
src/pyams_form/widget/templates/checkbox-display.pt
src/pyams_form/widget/templates/hidden-select-display.pt
src/pyams_form/widget/templates/hidden-select-input.pt
src/pyams_form/widget/templates/radio-display.pt
--- a/src/pyams_form/widget/templates/checkbox-display.pt	Fri Jul 26 19:17:03 2019 +0200
+++ b/src/pyams_form/widget/templates/checkbox-display.pt	Wed Aug 28 18:06:20 2019 +0200
@@ -1,4 +1,5 @@
-<i18n:var>
+<i18n:var i18n:domain="pyams_form"
+	tal:define="translate python:request.localizer.translate">
 	<tal:loop define="items view/items"
 			  repeat="item items">
 		<label class="checkbox">
@@ -60,7 +61,7 @@
 								alt view/alt;
 								accesskey view/accesskey;
 								onselect view/onselect" />
-			<i></i><span tal:replace="python:request.localizer.translate(item['label'])" i18n:translate="">Label</span>
+			<i></i><span tal:replace="python:translate(item['label'])" i18n:translate="">Label</span>
 		</label>
 	</tal:loop>
 </i18n:var>
--- a/src/pyams_form/widget/templates/hidden-select-display.pt	Fri Jul 26 19:17:03 2019 +0200
+++ b/src/pyams_form/widget/templates/hidden-select-display.pt	Wed Aug 28 18:06:20 2019 +0200
@@ -1,5 +1,5 @@
-<label class="input bordered"
-	   tal:omit-tag="view/required" i18n:domain="onf_website">
+<label class="input bordered" i18n:domain="pyams_form"
+	   tal:omit-tag="view/required">
 	<div class="select2-parent"
 		 tal:omit-tag="view/required">
 		<input type="hidden" autocomplete="none"
--- a/src/pyams_form/widget/templates/hidden-select-input.pt	Fri Jul 26 19:17:03 2019 +0200
+++ b/src/pyams_form/widget/templates/hidden-select-input.pt	Wed Aug 28 18:06:20 2019 +0200
@@ -1,5 +1,5 @@
-<label class="input bordered with-icon"
-	   tal:omit-tag="view/required" i18n:domain="onf_website">
+<label class="input bordered with-icon" i18n:domain="pyams_form"
+	   tal:omit-tag="view/required">
 	<i class="icon-append fa fa-trash-o text-primary hint opaque"
 		title="Clear selected values" i18n:attributes="title"
 		tal:omit-tag="view/required"
@@ -35,4 +35,4 @@
 								data-ams-select2-values view/values_map;
 								data-ams-select2-multiple python:'true' if view.multiple else None;" />
 	</div>
-</label>
+</label>
\ No newline at end of file
--- a/src/pyams_form/widget/templates/radio-display.pt	Fri Jul 26 19:17:03 2019 +0200
+++ b/src/pyams_form/widget/templates/radio-display.pt	Wed Aug 28 18:06:20 2019 +0200
@@ -1,5 +1,5 @@
-<input type="text" readonly
-	   tal:define="translate request.localizer.translate"
+<input type="text" readonly i18n:domain="pyams_form"
+	   tal:define="translate python:request.localizer.translate"
 	   tal:attributes="id view/id;
 					   class string:${view/klass} border-0;
 					   style view/style;
@@ -15,4 +15,4 @@
 					   onkeypress view/onkeypress;
 					   onkeydown view/onkeydown;
 					   onkeyup view/onkeyup;
-					   value python:', '.join((translate(value) for value in view.displayValue))" />
+					   value python:', '.join((translate(value) for value in view.displayValue))" />
\ No newline at end of file