blob: f622fd60fcd39371fe9eb85e087f3ac2108a5702 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<?php
/**
* Avatar crop form
*
* @uses $vars['entity']
*/
elgg_load_js('jquery.imgareaselect');
elgg_load_js('elgg.avatar_cropper');
elgg_load_css('jquery.imgareaselect');
$master_image = $vars['entity']->getIconUrl('master');
?>
<div class="clearfix">
<img id="user-avatar-cropper" class="mrl" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" />
<div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>
<div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div>
</div>
<div class="elgg-foot">
<?php
$coords = array('x1', 'x2', 'y1', 'y2');
foreach ($coords as $coord) {
echo elgg_view('input/hidden', array('name' => $coord, 'value' => $vars['entity']->$coord));
}
echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid));
echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create')));
?>
</div>
|