<label class="label-main"><?php echo _('Avatar image'); ?> (Jpg, Png, Gif)</label>

<div class="custom-file">
	<style>
		.custom-file-input ~ .custom-file-label::after {
			content: "<?php echo _('Browse'); ?>";
		}
	</style>
	<input type="file" class="custom-file-input field-avatar field-file" id="profile-avatar" name="data[avatar][value]">
	<label class="custom-file-label" for="profile-avatar"></label>
	
	<?php if($this->view->hasAvatar): ?>
		<input type="hidden" name="data[remove_avatar][value]" value="0">
		<div><small><input type="checkbox" id="remove_avatar" name="data[remove_avatar][value]" value="1"> <?php echo _('Remove the image without replacing it'); ?></small></div>
		<input type="hidden" name="data[remove_avatar][required]" value="0">
	<?php endif; ?>
	
	<input type="hidden" name="data[avatar][required]" value="0">
	<input type="hidden" name="data[avatar][type]" value="file">
	<input type="hidden" name="data[avatar][class]" value="field-avatar">
	<input type="hidden" name="data[avatar][label]" value="<?php echo _('Avatar image'); ?>">
</div>