This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
$viewedAt = $ack['viewed_at'] ?? '';
|
||||
$signedAt = $ack['signed_at'] ?? '';
|
||||
$signedName = $ack['signed_name'] ?? '';
|
||||
$hasReport = !empty(($reportAvailableMap ?? [])[$sid]);
|
||||
?>
|
||||
<tr>
|
||||
<td><?= esc(trim(($student['firstname'] ?? '') . ' ' . ($student['lastname'] ?? ''))) ?></td>
|
||||
@@ -62,8 +63,12 @@
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<a class="btn btn-sm btn-outline-primary" target="_blank" href="<?= base_url('parent/report-cards/view/' . $sid) ?>">View Report</a>
|
||||
<?php if (! $signedAt): ?>
|
||||
<?php if ($hasReport): ?>
|
||||
<a class="btn btn-sm btn-outline-primary" target="_blank" href="<?= base_url('parent/report-cards/view/' . $sid) ?>">View Report</a>
|
||||
<?php else: ?>
|
||||
<button class="btn btn-sm btn-outline-secondary" type="button" disabled>No report available</button>
|
||||
<?php endif; ?>
|
||||
<?php if ($hasReport && ! $signedAt): ?>
|
||||
<form class="d-inline-flex align-items-center gap-2 ms-2" method="post" action="<?= base_url('parent/report-cards/sign/' . $sid) ?>">
|
||||
<?= csrf_field() ?>
|
||||
<input type="text" name="signed_name" class="form-control form-control-sm" placeholder="Full name" required<?= $disabledAttr ?>>
|
||||
|
||||
Reference in New Issue
Block a user