<style>
.alinha{float: right;}
@media (min-width: 320px) and (max-width: 900px) {
.alinha{float: none;}
}
</style>

<li>
	<h3>%%LNG_Order%% #%%GLOBAL_OrderId%%</h3>
    <div class="alinha">
    	<a href="%%GLOBAL_ShopPath%%/account.php?action=view_order&order_id=%%GLOBAL_OrderId%%" class="btn btn-primary" style="margin-top:5px;">Ver Pedido</a>
    	<a href="%%GLOBAL_ShopPath%%/account.php?action=reorder&order_id=%%GLOBAL_OrderId%%" class="btn btn-primary" style="margin-top:5px;">Comprar Novamente</a>
    	<a style="display:%%GLOBAL_HideComprovante%%; margin-top:5px;" href="#" data-toggle="modal" data-target="#myModal%%GLOBAL_OrderId%%" class="btn btn-primary " >Enviar Comprovante </a>
    </div>

	<div class="modal fade" id="myModal%%GLOBAL_OrderId%%" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title" id="myModalLabel">Enviar Comprovante</h4>
				</div>

				<div class="modal-body">
					<div class="form-group">
						<label>Escolha o Arquivo: ( Somente: .JPG .JPEG .GIF .PNG ou .PDF )</label>
						<form id="form%%GLOBAL_OrderId%%" action="%%GLOBAL_ShopPath%%/lib/enviarComp.php" enctype="multipart/form-data" method="POST">
							<input type="hidden" value="%%GLOBAL_OrderId%%" name="id" />
							<input type="file" id="%%GLOBAL_OrderId%%" name="arquivo"  required/>
						</form>
					</div>
				</div>

    			<div class="modal-footer">
    			   <button id="send%%GLOBAL_OrderId%%" type="submit" class="btn btn-primary" >Enviar Comprovante</button>
				</div>
			</div>
		</div>
	</div>
   
	<p class="Meta">
		%%LNG_OrderDate%%: %%GLOBAL_OrderDate%%
	</p>
	<p>Status do Pedido: <strong><em>%%GLOBAL_OrderStatus%%</em></strong></p>
	<div style="display:%%GLOBAL_HidePaymentInstructions%%">
		<button type="button" class="btn btn-danger">%%LNG_YourOrderTotalIs%% <strong>%%GLOBAL_OrderTotal%%</button></strong>
		<br><br>
		<blockquote class="HowToPay">
			<span style="display:%%GLOBAL_HidePaymentInstructions%%">%%GLOBAL_OrderInstructions%%</span>
		</blockquote>
	</div>
	<hr />
</li>
<script>
	$(document).ready(function () {
	    $('#send%%GLOBAL_OrderId%%').bind("click", function () {
	        var imgVal = $('[type=file]').val();
	        if (imgVal == '') {
	            return false;
	        }
	    });
	});
</script>
<script>
	$(document).ready(function(){
		$('.comprovante%%GLOBAL_OrderId%%').click(function(){
			$('#comprovante%%GLOBAL_OrderId%%').modal('show')
		});
		$('#send%%GLOBAL_OrderId%%').click(function(){
			$('.sendConteudo').addClass('loading');
			$('#form%%GLOBAL_OrderId%%').submit();
		});
	});
</script>