2 <p id="cropimage-desc">
5 <div id="cropimage-wrapper">
6 <img src="{{$image_url}}" id="croppa" class="imgCrop" alt="{{$title}}" />
8 <div id="cropimage-preview-wrapper" >
9 <div id="previewWrap" ></div>
12 <script type="text/javascript" language="javascript">
14 function onEndCrop( coords, dimensions ) {
15 $PR( 'x1' ).value = coords.x1;
16 $PR( 'y1' ).value = coords.y1;
17 $PR( 'x2' ).value = coords.x2;
18 $PR( 'y2' ).value = coords.y2;
19 $PR( 'width' ).value = dimensions.width;
20 $PR( 'height' ).value = dimensions.height;
23 Event.observe( window, 'load', function() {
24 new Cropper.ImgWithPreview(
27 previewWrap: 'previewWrap',
32 ratioDim: { x: 100, y:100 },
42 <form action="profile_photo/{{$resource}}" id="crop-image-form" method="post" />
43 <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
45 <input type='hidden' name='profile' value='{{$profile}}'>
46 <input type="hidden" name="cropfinal" value="1" />
47 <input type="hidden" name="xstart" id="x1" />
48 <input type="hidden" name="ystart" id="y1" />
49 <input type="hidden" name="xfinal" id="x2" />
50 <input type="hidden" name="yfinal" id="y2" />
51 <input type="hidden" name="height" id="height" />
52 <input type="hidden" name="width" id="width" />
54 <div id="crop-image-submit-wrapper" >
55 <input type="submit" name="submit" value="{{$done}}" />