
<?php if($this->errorSize == true){ ?>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
	alertify.error("<i class='fa fa-close'></i> <?php echo @Lib_Lang::translate(admin_product_image_errorpi); ?>");
});
</script>

<?php }else{ ?>

	<script type="text/javascript" language="javascript">
	$(document).ready(function () {
	
		$("#deletePhoto_<?php echo $this->num; ?>").click(function(){		
			alertify.set({ buttonFocus: "none", labels: {ok: "<?php echo @Lib_Lang::translate(admin_confirm_accept); ?>", cancel: "<?php echo @Lib_Lang::translate(admin_confirm_cancel); ?>"}});
			alertify.confirm("<?php echo @Lib_Lang::translate(admin_product_image_deletecon); ?>?", function (e) {
				if (e) {
					$("#photo_main_<?php echo $this->num; ?>").remove();
				} else {
					return false;
				}
			});
		});
	
	});
	</script>

	<div style="margin-top:5px;border:1px solid #ccc;padding:10px;margin-bottom:5px;" id="photo_main_<?php echo $this->num; ?>">
	<center>
	<?php /*Zdjęcie:<br /><br />*/ ?>
		<img src="<?php echo $this->escape($this->baseUrl); ?>/<?php echo$this->photoUrl; ?>" style="border:1px solid #ccc;" /><br /><br />
	<?php /*Rozmiar: <?php echo$this->photoWidth.'x'.$this->photoHeight; ?> px<br /><br />*/ ?>
	<a class="form-control rejpole rejpolea" style="cursor:pointer;" id="deletePhoto_<?php echo $this->num; ?>"><?php echo @Lib_Lang::translate(admin_product_image_delete); ?> <span class="glyphicon glyphicon-remove" style="color:red;"></span></a>
	<input type="hidden" name="product_image_<?php echo $this->num; ?>" value="<?php echo$this->photoName; ?>" />
	</center>
	</div>
<?php } ?>
	