Added missing values to image crop template
authortflorac@dagon.home
Sat, 23 Jun 2018 13:02:47 +0200
changeset 105 2cbaa43fddec
parent 104 49e132e15bbc
child 106 db778bfa5f17
Added missing values to image crop template
src/pyams_file/zmi/templates/image-crop.pt
--- a/src/pyams_file/zmi/templates/image-crop.pt	Tue Jun 19 17:09:37 2018 +0200
+++ b/src/pyams_file/zmi/templates/image-crop.pt	Sat Jun 23 13:02:47 2018 +0200
@@ -2,10 +2,10 @@
 				 image thumbnails.get_thumbnail('800x480');
 				 size context.get_image_size();
 				 thumb_size image.get_image_size();">
-	<input type="hidden" name="selection.x1" />
-	<input type="hidden" name="selection.y1" />
-	<input type="hidden" name="selection.x2" />
-	<input type="hidden" name="selection.y2" />
+	<input type="hidden" name="selection.x1" value="0" />
+	<input type="hidden" name="selection.y1" value="0"  />
+	<input type="hidden" name="selection.x2" tal:attributes="value size[0]" />
+	<input type="hidden" name="selection.y2" tal:attributes="value size[1]" />
  	<img class="imgareaselect"
 		 data-ams-imgareaselect-parent=".modal-dialog"
 		 data-ams-imgareaselect-target-field="selection."