feat: enlaces de formulario sin vencimiento + PDF descargable sin sesión vía token público

This commit is contained in:
Lizandro Guarnizo
2026-03-25 16:14:26 -05:00
parent 9c989ce616
commit 3b92f47b54
4 changed files with 60 additions and 30 deletions
+4 -4
View File
@@ -853,8 +853,8 @@ const formCliente = {
show('yf-firma-thumb');
}
// Link al PDF (requiere sesión admin, se muestra de todas formas)
$('yf-pdf-btn').href = 'ver_formulario_enviado.php?id=' + env.id;
// Link al PDF (acceso público vía token, no requiere sesión)
$('yf-pdf-btn').href = 'ver_formulario_enviado.php?t=' + encodeURIComponent(TOKEN);
if (env.hash_verificacion) {
$('yf-hash').textContent = env.hash_verificacion;
@@ -1080,10 +1080,10 @@ const formCliente = {
$('success-hash').textContent = d.hash;
show('success-hash-box');
}
// Link al PDF
// Link al PDF (acceso público vía token, no requiere sesión)
if (d.envio_id) {
const pdfBtn = $('success-pdf-btn');
pdfBtn.href = 'ver_formulario_enviado.php?id=' + d.envio_id;
pdfBtn.href = 'ver_formulario_enviado.php?t=' + encodeURIComponent(TOKEN);
show('success-pdf-row');
}
show('success-screen');