Bloqueo de cuenta y config. resumen
This commit is contained in:
@@ -424,6 +424,13 @@ $mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encue
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.blocked) {
|
||||
mostrarError(data.message); // <-- función personalizada con un div bonito
|
||||
setTimeout(() => {
|
||||
window.location.href = data.redirect;
|
||||
}, 4000);
|
||||
}
|
||||
|
||||
if (data.success) {
|
||||
// Código correcto
|
||||
mostrarExito(data.message);
|
||||
@@ -454,6 +461,16 @@ $mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encue
|
||||
});
|
||||
}
|
||||
|
||||
// Mostrar error de cuenta bloqueada
|
||||
function mostrarError(mensaje) {
|
||||
const mensajeDiv = document.getElementById('mensaje');
|
||||
mensajeDiv.innerHTML = `
|
||||
<div class="text-danger fade-in">
|
||||
<i class="fas fa-exclamation-triangle me-2"></i> ${mensaje}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
// Manejar código incorrecto
|
||||
function manejarCodigoIncorrecto(data) {
|
||||
intentosRealizados++;
|
||||
|
||||
Reference in New Issue
Block a user