Add new files and make code improvements
This commit is contained in:
@@ -59,13 +59,14 @@ if(!is_null($user->periodo_id)){
|
||||
if(strtotime($periodo_rs["periodo_fecha_inicio"])>strtotime(date("Y-m-d")) )
|
||||
$fecha_man = date("d/m/Y", strtotime($periodo_rs["periodo_fecha_inicio"]));
|
||||
else{
|
||||
$dias = 3;
|
||||
if( intval(date("w")) >=3 && intval(date("w"))<=5 )//Mie a Vie
|
||||
$dias+=3;
|
||||
else if( intval(date("w")) ==6 )//Sab
|
||||
$dias+=2;
|
||||
else if( intval(date("w")) ==0 )//Do
|
||||
$dias+=1;
|
||||
$dia_actual = intval(date("w"));
|
||||
$dias = 2;//días mínimos Lun a Jue
|
||||
if($dia_actual ==5 || $dia_actual ==4 )//Vie
|
||||
$dias=4;
|
||||
else if( $dia_actual ==6 )//Sab
|
||||
$dias=3;
|
||||
else if( $dia_actual ==0 )//Do
|
||||
$dias=2;
|
||||
|
||||
$fecha_man = date("d/m/Y", strtotime("+".$dias." day"));
|
||||
}
|
||||
@@ -363,7 +364,7 @@ if(!is_null($user->periodo_id)){
|
||||
<label for="fecha_inicial" class="col-4 col-form-label">Fecha de reposicion *</label>
|
||||
<div class="col-8">
|
||||
<input id="fecha_inicial" name="fecha_inicial" type="text" class="form-control date-picker-future" placeholder="dd/mm/aaaa" maxlength="10" required="required" readonly="readonly" value="">
|
||||
<small class="form-text text-muted">Las reposiciones se deben solicitar con al menos 72hrs de anticipación.<br>
|
||||
<small class="form-text text-muted">Las reposiciones se deben solicitar con al menos 48hrs de anticipación.<br>
|
||||
Recuerda que en sábado el límite para terminar la clase es a las 15:00hrs.
|
||||
</small>
|
||||
</div>
|
||||
@@ -406,9 +407,11 @@ if(!is_null($user->periodo_id)){
|
||||
<div class="datalist-input">Salón</div>
|
||||
<span class="ing-buscar icono"></span>
|
||||
<ul style="display:none">
|
||||
<li data-id="1">Salón</li>
|
||||
<li data-id="2">Sala de cómputo</li>
|
||||
<li data-id="3">Salón/Taller de la facultad</li>
|
||||
<?php
|
||||
$tipoaula_rs = $db->query('select * from tipoaula t order by t.tipoaula_id ');
|
||||
foreach($tipoaula_rs as $ta){ ?>
|
||||
<li data-id="<?php echo $ta["tipoaula_id"];?>"><?php echo $ta["tipoaula_nombre"];?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<input type="hidden" id="aula" name="aula" value="1">
|
||||
</div>
|
||||
@@ -459,12 +462,19 @@ if(!is_null($user->periodo_id)){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row mt-3">
|
||||
<div class="form-group row mt-3" id="submitGroup">
|
||||
<div class="offset-4 col-8">
|
||||
<button type="submit" class="btn btn-outline-primary materia-block" id="submitBtn" data-tipo="1"><?php echo $ICO["aceptar"];?> Guardar</button>
|
||||
<button type="reset" class="btn btn-outline-danger" data-dismiss="modal"><?php echo $ICO["cancelar"];?> Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row mt-3" id="loadingGroup" style="display:none">
|
||||
<div class="col-12 text-center">
|
||||
<div class="spinner-border text-primary" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -759,6 +769,10 @@ if(!is_null($user->periodo_id)){
|
||||
}else{
|
||||
$('#formaModal').prop("action", "./action/reposicion_insert.php");
|
||||
}
|
||||
if(!error){
|
||||
$("#loadingGroup").show();
|
||||
$("#submitGroup").hide();
|
||||
}
|
||||
return !error;
|
||||
}
|
||||
|
||||
@@ -945,6 +959,9 @@ if(!is_null($user->periodo_id)){
|
||||
var button = $(event.relatedTarget); // Button that triggered the modal
|
||||
var tipo = button.data('tipo'); // 1 alta, 2 edicion
|
||||
var modal = $(this);
|
||||
|
||||
$("#loadingGroup").hide();
|
||||
$("#submitGroup").show();
|
||||
|
||||
$("#modal .is-invalid").removeClass("is-invalid");
|
||||
//$(this).find(".form-control:first-child").focus();
|
||||
@@ -1050,7 +1067,7 @@ if(!is_null($user->periodo_id)){
|
||||
})
|
||||
</script>
|
||||
<script src="js/messages.js"></script>
|
||||
<script type="module" src="js/reposiciones.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user