<?php
  $id=$_GET['id'];
  $event=$_GET['event'];
?>
<form method="get" action="" id="enviar_acuse" name="enviar_acuse">
    <div id="resultados_dian"></div>
    <input type="hidden" id="id" name="id" value="<?php echo $id; ?>" class="form-control name_list" readonly>
    <input type="hidden" id="event" name="event" value="<?php echo $event; ?>" class="form-control name_list" >
    <?php if( $event=='1'){ ?>
    <div id="alert" class='alert alert-info alert-dismissable'><strong>Confirmar Acuse de Recibo</strong></div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
        <button type="submit" name="btn_enviar_acuse" class="btn btn-info" value="btn_enviar_acuse" id="btn_enviar_acuse">Aceptar</button>
    </div>
    <?php } ?>
    <?php if( $event=='3'){ ?>
    <div id="alert"class='alert alert-warning alert-dismissable'><strong>Confirmar Recepcion Bienes</strong></div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
        <button type="submit" name="btn_enviar_acuse" class="btn btn-warning" value="btn_enviar_acuse" id="btn_enviar_acuse">Aceptar</button>
    </div>
    <?php } ?>
    <?php if( $event=='4'){ ?>
    <div id="alert" class='alert alert-success alert-dismissable'><strong>Confirmar Aceptacion Expresa</strong></div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
        <button type="submit" name="btn_enviar_acuse" class="btn btn-success" value="btn_enviar_acuse" id="btn_enviar_acuse">Aceptar</button>
    </div>
    <?php } ?>
   
    
</form>

<script>
$( "#enviar_acuse" ).submit(function( event ) {
$('#btn_enviar_acuse').attr("disabled", true);
$('#alert').hide(); 

var parametros = $(this).serialize();
$.ajax({
      type: "GET",
      url: "php_eventos_radian/acuse.php",
      data: parametros,
        beforeSend: function(objeto){
         $('#resultados_dian').html('<center><img src="./img/ajax-loader.gif"> CARGANDO...</center>');
        },
        success: function(datos){
        $("#resultados_dian").html(datos);
        $('#btn_enviar_correo').attr("disabled", false);

        load(1);
      }
  });
  event.preventDefault();
})
</script>