108 lines
5.8 KiB
PHP
108 lines
5.8 KiB
PHP
<?= $this->extend('layout/main_layout') ?>
|
||
<?= $this->section('content') ?>
|
||
<div class="container my-5">
|
||
<h3 class="text-center text-success">Financial Aid</h3>
|
||
<?php if (!empty($schoolYear)): ?>
|
||
<div class="text-center text-muted small mb-3">School Year: <?= esc($schoolYear) ?></div>
|
||
<?php endif; ?>
|
||
|
||
<?php if (session()->getFlashdata('success')): ?>
|
||
<div class="alert alert-success"><?= esc(session()->getFlashdata('success')) ?></div>
|
||
<?php endif; ?>
|
||
<?php if (session()->getFlashdata('error')): ?>
|
||
<div class="alert alert-danger"><?= esc(session()->getFlashdata('error')) ?></div>
|
||
<?php endif; ?>
|
||
|
||
<div class="alert alert-warning" role="alert">
|
||
<h4 class="alert-heading">
|
||
<i class="bi bi-exclamation-triangle-fill me-2"></i>
|
||
Bring these documents to the school office
|
||
</h4>
|
||
<p class="mb-2">
|
||
You must bring <strong>2 recent pay stubs</strong> <strong>and</strong> <strong>last year’s tax return</strong>
|
||
to the school office so administration can review your financial aid request.
|
||
</p>
|
||
<ul class="mb-2">
|
||
<li><strong>Recent pay stubs</strong></li>
|
||
<li><strong>Last year’s tax return</strong></li>
|
||
</ul>
|
||
<p class="mb-0">This is required whether you are submitting a new request or already have one open.</p>
|
||
</div>
|
||
|
||
<p>Use this form to request a tuition reduction. Administration will review the request and apply any approved amount to your invoice.</p>
|
||
|
||
<?php if (!empty($requests)): ?>
|
||
<div class="table-responsive mb-4">
|
||
<table class="table table-bordered">
|
||
<thead>
|
||
<tr>
|
||
<th>Submitted</th>
|
||
<th>Status</th>
|
||
<th>Decision</th>
|
||
<th>Requested</th>
|
||
<th>Approved amount</th>
|
||
<th>Note</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php foreach ($requests as $row): ?>
|
||
<?php
|
||
$status = (string) ($row['status'] ?? '');
|
||
$decisionLabel = 'Pending review';
|
||
$decisionClass = 'bg-secondary';
|
||
if ($status === 'approved') {
|
||
$decisionLabel = 'Approved';
|
||
$decisionClass = 'bg-success';
|
||
} elseif ($status === 'denied') {
|
||
$decisionLabel = 'Denied';
|
||
$decisionClass = 'bg-danger';
|
||
} elseif ($status === 'under_review') {
|
||
$decisionLabel = 'Under review';
|
||
$decisionClass = 'bg-info text-dark';
|
||
}
|
||
?>
|
||
<tr>
|
||
<td><?= esc($row['created_at'] ?? '') ?></td>
|
||
<td><?= esc($row['status'] ?? '') ?></td>
|
||
<td><span class="badge <?= esc($decisionClass) ?>"><?= esc($decisionLabel) ?></span></td>
|
||
<td><?= $row['requested_amount'] !== null && $row['requested_amount'] !== '' ? '$' . number_format((float) $row['requested_amount'], 2) : 'Not specified' ?></td>
|
||
<td><?= $row['admin_amount'] !== null && $row['admin_amount'] !== '' ? '$' . number_format((float) $row['admin_amount'], 2) : '—' ?></td>
|
||
<td><?= esc($row['admin_note'] ?? '') ?></td>
|
||
</tr>
|
||
<?php endforeach; ?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
<?php if (empty($existingRequest)): ?>
|
||
<form method="post" action="<?= site_url('parent/financial-aid') ?>" class="border rounded p-3 bg-light">
|
||
<?= csrf_field() ?>
|
||
<div class="mb-3">
|
||
<label class="form-label" for="household_income">Household income <span class="text-danger">*</span></label>
|
||
<input class="form-control" type="number" min="0" step="0.01" name="household_income" id="household_income" required value="<?= esc(old('household_income')) ?>">
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label" for="household_size">Household size <span class="text-danger">*</span></label>
|
||
<input class="form-control" type="number" min="1" name="household_size" id="household_size" required value="<?= esc(old('household_size')) ?>">
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label" for="requested_amount">Requested amount <span class="text-danger">*</span></label>
|
||
<input class="form-control" type="number" min="0.01" step="0.01" name="requested_amount" id="requested_amount" required value="<?= esc(old('requested_amount')) ?>">
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label" for="need_statement">Reason for financial aid request <span class="text-danger">*</span></label>
|
||
<textarea class="form-control" name="need_statement" id="need_statement" rows="5" required><?= esc(old('need_statement')) ?></textarea>
|
||
</div>
|
||
<button class="btn btn-success" type="submit">Submit request</button>
|
||
</form>
|
||
<?php else: ?>
|
||
<div class="alert alert-info">
|
||
You already submitted a financial aid application for <?= esc($schoolYear ?: 'this school year') ?>.
|
||
Parents can submit only one application per school year. Administration will update your request after review.
|
||
Remember to bring recent pay stubs and last year’s tax return to the school office.
|
||
</div>
|
||
<?php endif; ?>
|
||
</div>
|
||
<?= $this->endSection() ?>
|