AVP-85 Active link when clicking of Parent's email address

This commit is contained in:
root
2026-03-01 17:24:20 -05:00
parent a18198d547
commit 35b9cba882
9 changed files with 380 additions and 31 deletions
+12 -1
View File
@@ -22,6 +22,10 @@ if ($title === '' || preg_match('/^\s*Family\s+of\s+User\s*\d+\s*$/i', $title))
}
$title = $lastName !== '' ? ('Family of ' . $lastName) : 'Family';
}
$returnUrl = trim((string)service('request')->getServer('HTTP_REFERER'));
if ($returnUrl === '') {
$returnUrl = site_url('family');
}
?>
<div class="family-card-root" data-family-title="<?= esc($title) ?>">
@@ -187,7 +191,14 @@ if ($title === '' || preg_match('/^\s*Family\s+of\s+User\s*\d+\s*$/i', $title))
<td class="small" data-label="Contact">
<div>
<i class="bi bi-envelope me-1 text-muted"></i>
<?= !empty($g['email']) ? ('<a href="mailto:'.esc($g['email']).'">'.esc($g['email']).'</a>') : '<span class="text-muted">—</span>' ?>
<?php
$gEmail = trim((string)($g['email'] ?? ''));
$gName = trim((string)($g['firstname'] ?? '') . ' ' . (string)($g['lastname'] ?? ''));
$composeUrl = $gEmail !== ''
? site_url('family/compose-email?to=' . rawurlencode($gEmail) . '&name=' . rawurlencode($gName) . '&return_url=' . rawurlencode($returnUrl))
: '';
?>
<?= $gEmail !== '' ? ('<a href="' . esc($composeUrl) . '" target="_blank" rel="noopener">' . esc($gEmail) . '</a>') : '<span class="text-muted">—</span>' ?>
</div>
<div class="mt-1">
<i class="bi bi-telephone me-1 text-muted"></i>