This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<?= $this->extend('layout/main_layout') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php
|
||||
$isEditable = (bool) ($isEditable ?? true);
|
||||
$disabledAttr = $isEditable ? '' : ' disabled';
|
||||
?>
|
||||
<div class="container my-5">
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mb-3">
|
||||
<div>
|
||||
@@ -16,6 +20,11 @@
|
||||
<?php if (session()->getFlashdata('success')): ?>
|
||||
<div class="alert alert-success"><?= esc(session()->getFlashdata('success')) ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (! $isEditable): ?>
|
||||
<div class="alert alert-info">
|
||||
You are viewing <?= esc($schoolYear ?: 'a closed school year') ?>. Report card signatures are read-only for closed years.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (empty($students)): ?>
|
||||
<div class="alert alert-info">No students available for report cards.</div>
|
||||
@@ -57,8 +66,8 @@
|
||||
<?php if (! $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>
|
||||
<button class="btn btn-sm btn-success" type="submit">Sign</button>
|
||||
<input type="text" name="signed_name" class="form-control form-control-sm" placeholder="Full name" required<?= $disabledAttr ?>>
|
||||
<button class="btn btn-sm btn-success" type="submit"<?= $disabledAttr ?>>Sign</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user