fix parent and teacher pages to follow year filter
Tests / PHPUnit (push) Failing after 1m15s

This commit is contained in:
root
2026-07-15 20:03:36 -04:00
parent feb1b29a32
commit 5f27dccd0f
32 changed files with 582 additions and 364 deletions
+4 -16
View File
@@ -2,22 +2,10 @@
<?= $this->section('content') ?>
<div class="container my-5">
<h3 class="text-center text-success" style="font-family: Arial, sans-serif;">Attendance Record</h2>
<?php if (!empty($selectedYear)): ?>
<div class="text-center text-muted small">School Year: <?= esc($selectedYear) ?></div>
<?php endif; ?>
</div>
<!-- Filter Form -->
<form action="" method="get" class="form-inline">
<div class="d-flex align-items-center">
<select name="school_year" id="school_year" class="form-control me-3"> <!-- Added me-3 (right margin) -->
<?php foreach ($schoolYears as $year): ?>
<option value="<?= esc($year['school_year']) ?>" <?= $selectedYear === $year['school_year'] ? 'selected' : '' ?>>
<?= esc($year['school_year']) ?>
</option>
<?php endforeach; ?>
</select>
<button type="submit" class="btn btn-success">Filter</button>
</div>
</form>
<!-- Error Message -->
<?php if (isset($error)): ?>
@@ -52,7 +40,7 @@
</tbody>
</table>
<?php else: ?>
<div class="alert alert-info mb-3 d-inline-block">No attendance records found for the selected school year.</div>
<div class="alert alert-info mb-3 d-inline-block">No attendance records found for this school year.</div>
<?php endif; ?>
</main>
</div>