<style>

.ulp-user-avatar-wrapp{
    width: 150px;
    height: 150px;
}


</style>
<?php wp_enqueue_style( 'ulp-croppic_css', ULP_URL . 'assets/css/croppic.css' );?>
<?php wp_enqueue_script( 'ulp-jquery_mousewheel', ULP_URL . 'assets/js/jquery.mousewheel.min.js', array(), null );?>
<?php wp_enqueue_script( 'ulp-croppic', ULP_URL . 'assets/js/croppic.js', array(), null );?>
<?php wp_enqueue_script( 'ulp-image_croppic', ULP_URL . 'assets/js/image_croppic.js', array(), null );?>

<script>
jQuery( document ).ready( function(){
    UlpAvatarCroppic.init({
        triggerId					           : '<?php echo 'js_ulp_trigger_avatar' . $data['rand'];?>',
        saveImageTarget		           : '<?php echo ULP_URL . "ajax_upload.php";?>',
    		cropImageTarget              : '<?php echo ULP_URL . "ajax_upload.php";?>',
        imageSelectorWrapper         : '.ulp-upload-image-wrapp',
        hiddenInputSelector          : '[name=<?php echo $data['name'];?>]',
        imageClass                   : 'ulp-member-photo',
        removeImageSelector          : '<?php echo '#ulp_upload_image_remove_bttn_' . $data['rand'];?>',
    		buttonId 					           : 'ulp-avatar-button',
    		buttonLabel 			     : '<?php echo __('Upload', 'ihc');?>',
    })
})
</script>

<div class="">
    <div class="ulp-upload-image-wrapp" >
        <?php if ( !empty($data['imageUrl']) ):?>
            <img src="<?php echo $data['imageUrl'];?>" class="<?php echo $data['imageClass'];?>" />
        <?php else:?>
            <?php if ( $data['name']=='ulp_avatar' ):?>
                <div class="ulp-no-avatar ulp-member-photo"></div>
            <?php endif;?>
        <?php endif;?>
        <div class="ulp-clear"></div>
    </div>
    <div class="">
    	<div class="ulp-avatar-trigger" id="<?php echo 'js_ulp_trigger_avatar' . $data['rand'];?>" >
        	<div id="ulp-avatar-button" class="ulp-upload-avatar"><?php _e('Upload', 'uap');?></div>
        </div>
        <span  style ="visibility: hidden;" class="ulp-upload-image-remove-bttn" id="<?php echo 'ulp_upload_image_remove_bttn_' . $data['rand'];?>"><?php _e('Remove', 'ulp');?></span>
    </div>
    <input type="hidden" value="<?php echo $data['value'];?>" name="<?php echo $data['name'];?>" id="<?php echo 'ulp_upload_hidden_' . $data['rand'];?>" />

    <?php if (!empty($data['sublabel'])):?>
        <label class="ulp-form-sublabel"><?php echo indeed_correct_text($data['sublabel']);?></label>
    <?php endif;?>
</div>
