fix: forzar HTTPS en link de consentimiento + botón abrir en navegador
- create_turno.php: reemplaza http:// por https:// en el link enviado por WhatsApp, evitando que Android CCT bloquee páginas HTTP - ver_formulario_enviado.php: agrega botón "Abrir en navegador" en la barra de acción cuando el modo es turnero, como fallback para Android Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8b0bdc6b30
commit
50446a3914
@@ -156,6 +156,8 @@ try {
|
||||
// Solo generar enlace si el modo es 'link' (embebido no usa WA)
|
||||
if (($formRow['formulario_modo'] ?? 'link') === 'link') {
|
||||
$baseUrl = defined('BASE_URL') ? rtrim(BASE_URL, '/') : '';
|
||||
// Forzar HTTPS: Android WhatsApp CCT bloquea páginas HTTP
|
||||
$baseUrl = preg_replace('#^http://#', 'https://', $baseUrl);
|
||||
$enlaceConsentimiento = $baseUrl . '/ver_formulario_enviado.php?token=' . urlencode($conToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -677,6 +677,12 @@ function _addExamWizardHtml(string $cid): string {
|
||||
<?= $envio['estado'] === 'firmado' ? 'Consentimiento firmado ✓' : 'Lea el documento y firme al final' ?>
|
||||
</span>
|
||||
<div style="flex:1"></div>
|
||||
<a href="<?= htmlspecialchars('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) ?>"
|
||||
target="_blank" rel="noopener"
|
||||
style="font-size:12px;color:rgba(255,255,255,.85);text-decoration:none;border:1px solid rgba(255,255,255,.4);padding:3px 8px;border-radius:5px;white-space:nowrap"
|
||||
title="Abrir en el navegador externo si la página no carga bien">
|
||||
<i class="fas fa-external-link-alt me-1"></i>Abrir en navegador
|
||||
</a>
|
||||
<?php if ($envio['estado'] === 'firmado'): ?>
|
||||
<button onclick="window.print()" class="btn btn-warning btn-sm fw-semibold">
|
||||
<i class="fas fa-file-pdf me-2"></i>Imprimir
|
||||
|
||||
Reference in New Issue
Block a user