<div class="modal fade" id="assignClassModal" tabindex="-1" aria-labelledby="assignClassModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="assignClassModalLabel">Assign Class</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
<form id="assignClassForm" action="/assign_class_teacher" method="post">
    <input type="hidden" id="assignCsrfField" name="<?= esc(csrf_token()) ?>" value="<?= esc(csrf_hash()) ?>">
    <input type="hidden" name="teacher_id" id="teacherId" value="">
    <input type="hidden" name="teacher_role" id="teacherRoleHidden" value="">

    <div class="mb-3">
        <label for="teacherName" class="form-label">Name</label>
        <input type="text" class="form-control" id="teacherName" readonly>
    </div>

    <div class="mb-3">
        <label for="teacherRoleDisplay" class="form-label">Role</label>
        <input type="text" class="form-control" id="teacherRoleDisplay" readonly>
    </div>

    <div class="mb-3">
        <label for="class_section_id" class="form-label">Select Class</label>
        <select name="class_section_id" id="class_section_id" class="form-control" required>
            <option value="" disabled selected>Loading classes...</option>
        </select>
    </div>
</form>

            </div>
            <div class="modal-footer">
                  <button type="button" class="btn btn-success" id="assignClassButton">Save</button>
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
