diff --git a/ver_formulario_enviado.php b/ver_formulario_enviado.php
index 872d021..143e967 100644
--- a/ver_formulario_enviado.php
+++ b/ver_formulario_enviado.php
@@ -2550,6 +2550,17 @@ const topaz = (() => {
});
}
+ function _toast(msg) {
+ const t = document.createElement('div');
+ t.style.cssText = 'position:fixed;bottom:24px;left:50%;transform:translateX(-50%);'
+ + 'background:#1e293b;color:#fff;padding:12px 22px;border-radius:10px;'
+ + 'font-size:.88rem;z-index:99999;box-shadow:0 4px 16px rgba(0,0,0,.3);'
+ + 'max-width:90vw;text-align:center;line-height:1.5';
+ t.innerHTML = '' + msg;
+ document.body.appendChild(t);
+ setTimeout(() => t.remove(), 5000);
+ }
+
function _setStatus(msg, ok) {
const el = document.getElementById('topaz-status-msg');
if (el) { el.textContent = msg; el.style.color = ok ? '#198754' : '#64748b'; }
@@ -2562,7 +2573,7 @@ const topaz = (() => {
async function activar(target) {
const ok = await _loadScript();
if (!ok) {
- alert('No se detectó SigWeb.\nInstala el servicio Topaz SigWeb y vuelve a intentarlo.');
+ _toast('Pad biométrico no disponible en este equipo.
Instala el servicio Topaz SigWeb o usa la firma manual.');
return;
}
_target = target;
@@ -2574,7 +2585,7 @@ const topaz = (() => {
_call('SetTabletState', 1);
_call('ClearTablet');
} catch(e) {
- alert('Error al activar el pad: ' + e.message); return;
+ _toast('Error al activar el pad: ' + e.message); return;
}
document.getElementById('topaz-overlay').style.display = 'flex';
document.getElementById('topaz-btn-aceptar').disabled = true;
@@ -2614,7 +2625,7 @@ const topaz = (() => {
try { b64 = _call('GetSigImageB64'); } catch(e) {
alert('Error al capturar la firma: ' + e.message); _cerrar(); return;
}
- if (!b64) { alert('No se capturó ninguna firma.'); return; }
+ if (!b64) { _toast('No se capturó ninguna firma.'); return; }
const target = _target;
_cerrar();
const img = new Image();