feat: enlaces de formulario sin vencimiento + PDF descargable sin sesión vía token público
This commit is contained in:
+4
-4
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user