<?php $__env->startSection('title', $title); ?>


<!-- BEGIN PAGE CSS -->
<?php $__env->startSection('page-css'); ?>
    <style>
        .toggle-code-snippet {
            margin-bottom: 0px;
        }

        body.dark .toggle-code-snippet {
            margin-bottom: 0px;
        }
    </style>
    <link rel="stylesheet" href="/cork/src/plugins/css/dark/table/datatable/dt-global_style.css">
    <link href="/cork/src/plugins/src/flatpickr/flatpickr.css" rel="stylesheet" type="text/css">
    <link href="/cork/src/plugins/src/noUiSlider/nouislider.min.css" rel="stylesheet" type="text/css">

    <link href="/cork/src/assets/css/light/scrollspyNav.css" rel="stylesheet" type="text/css" />
    <link href="/cork/src/assets/css/dark/scrollspyNav.css" rel="stylesheet" type="text/css" />
<?php $__env->stopSection(); ?>
<!-- END PAGE CSS -->

<!-- BREADCRUMB -->
<?php $__env->startSection('breadcrumb'); ?>
    <div class="page-meta">
        <nav class="breadcrumb-style-one" aria-label="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Home</a></li>
                <li class="breadcrumb-item"><a href="<?php echo e(route('students.index')); ?>">Students</a></li>
                <li class="breadcrumb-item active" aria-current="page"><?php echo e($title); ?></li>
            </ol>
        </nav>
    </div>
    <!-- /BREADCRUMB -->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <form method="post"
        action="<?php if($action == 'create'): ?> <?php echo e(route('students.store')); ?> <?php else: ?> <?php echo e(route('students.update', $student->id)); ?> <?php endif; ?>">
        <?php echo csrf_field(); ?>
        <?php if($action == 'edit'): ?>
            <?php echo method_field('PUT'); ?>
        <?php endif; ?>
        <div class="form-group">

            <label for="first_name">First Name*</label>
            <div class="form-row">
                <div class="col-md-6 mb-4">
                    <input type="text" class="form-control <?php $__errorArgs = ['first_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="first_name"
                        id="first_name" aria-describedby="basic-addon3" placeholder="First Name" maxlength="100"
                        <?php if(isset($student->first_name)): ?> value="<?php echo e($student->first_name); ?>" <?php else: ?> value="<?php echo e(old('first_name')); ?>" <?php endif; ?>>
                    <?php $__errorArgs = ['first_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('first_name')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="last_name">Last Name*</label>
            <div class="form-row">
                <div class="col-md-6 mb-4">
                    <input type="text" class="form-control <?php $__errorArgs = ['last_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="last_name"
                        id="last_name" aria-describedby="basic-addon3" placeholder="Last Name" maxlength="100"
                        <?php if(isset($student->last_name)): ?> value="<?php echo e($student->last_name); ?>" <?php else: ?> value="<?php echo e(old('last_name')); ?>" <?php endif; ?>>
                    <?php $__errorArgs = ['last_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('last_name')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="school_id">School*</label>
            <div class="form-row">
                <div class="col-md-3 mb-4">
                    <select name="school_id" id="school_id" class="form-select <?php $__errorArgs = ['school_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                        <?php $__currentLoopData = $schools; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $school): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($school->id); ?>" <?php if(@isset($student->school_id) && $school->id === $student->school_id): ?> selected <?php endif; ?>>
                                <?php echo e($school->name); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                    <?php $__errorArgs = ['school_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('school_id')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="email">Email*</label>
            <div class="form-row">
                <div class="col-md-6 mb-4">
                    <input type="text" class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="email"
                        id="email" aria-describedby="basic-addon3" placeholder="Email" maxlength="50"
                        <?php if(isset($student->email)): ?> value="<?php echo e($student->email); ?>" <?php else: ?> value="<?php echo e(old('email')); ?>" <?php endif; ?>>
                    <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('email')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="dob">Date of Birth*</label>
            <div class="form-row">
                <div class="col-md-2 mb-4">
                    <input type="text" class="form-control <?php $__errorArgs = ['dob'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="dob"
                        id="dob" aria-describedby="basic-addon3" placeholder="DOB" maxlength="10"
                        <?php if(isset($student->dob)): ?> value="<?php echo e($student->dob); ?>" <?php else: ?> value="<?php echo e(old('dob')); ?>" <?php endif; ?>>
                    <?php $__errorArgs = ['dob'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('dob')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="phone">Phone (format: 7015551234)</label>
            <div class="form-row">
                <div class="col-md-4 mb-4">
                    <input type="text" class="form-control <?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="phone"
                        id="phone" aria-describedby="basic-addon3" placeholder="Phone" maxlength="10"
                        <?php if(isset($student->phone)): ?> value="<?php echo e($student->phone); ?>" <?php else: ?> value="<?php echo e(old('phone')); ?>" <?php endif; ?>>
                    <?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('phone')); ?>

                        </div>
                        <pre>
                </pre>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="grade">Grade* (2025-26)</label>
            <div class="form-row">
                <div class="col-md-2 mb-4">
                    <select name="grade" id="grade" class="form-select <?php $__errorArgs = ['grade'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                        <option value="12" <?php if(@isset($student->grade) && 12 === $student->grade): ?> selected <?php endif; ?>>12</option>
                        <option value="11" <?php if(@isset($student->grade) && 11 === $student->grade): ?> selected <?php endif; ?>>11</option>
                        <option value="10" <?php if(@isset($student->grade) && 10 === $student->grade): ?> selected <?php endif; ?>>10</option>
                        <option value="9" <?php if(@isset($student->grade) && 9 === $student->grade): ?> selected <?php endif; ?>>9</option>
                        <option value="8" <?php if(@isset($student->grade) && 9 === $student->grade): ?> selected <?php endif; ?>>8</option>
                        <option value="7" <?php if(@isset($student->grade) && 9 === $student->grade): ?> selected <?php endif; ?>>7</option>
                    </select>
                    <?php $__errorArgs = ['grade'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('grade')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="gender">Gender</label>
            <div class="form-row">
                <div class="col-md-2 mb-4">
                    <select name="gender" id="gender" class="form-select <?php $__errorArgs = ['gender'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                        <option value="M" <?php if(@isset($student->gender) && 'M' === $student->gender): ?> selected <?php endif; ?>>Male</option>
                        <option value="F" <?php if(@isset($student->gender) && 'F' === $student->gender): ?> selected <?php endif; ?>>Female</option>
                    </select>
                    <?php $__errorArgs = ['gender'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('gender')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="ssid">State Student ID</label>
            <div class="form-row">
                <div class="col-md-3 mb-4">
                    <input type="text" class="form-control <?php $__errorArgs = ['ssid'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="ssid"
                        id="ssid" aria-describedby="basic-addon3" placeholder="State Student ID" maxlength="10"
                        <?php if(isset($student->ssid)): ?> value="<?php echo e($student->ssid); ?>" <?php else: ?> value="<?php echo e(old('ssid')); ?>" <?php endif; ?>>
                    <?php $__errorArgs = ['ssid'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('ssid')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>


            <label for="iep">Has IEP?*</label>
            <div class="form-row">
                <div class="col-md-2 mb-4">
                    <select name="iep" id="iep" class="form-select <?php $__errorArgs = ['iep'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                        <option value="0" <?php if(@isset($student->iep) && 0 === $student->iep): ?> selected <?php endif; ?>>No</option>
                        <option value="1" <?php if(@isset($student->iep) && 1 === $student->iep): ?> selected <?php endif; ?>>Yes</option>
                    </select>
                    <?php $__errorArgs = ['iep'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('iep')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="has_504">Has 504?*</label>
            <div class="form-row">
                <div class="col-md-2 mb-4">
                    <select name="has_504" id="has_504" class="form-select <?php $__errorArgs = ['has_504'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                        <option value="0" <?php if(@isset($student->has_504) && 0 === $student->has_504): ?> selected <?php endif; ?>>No</option>
                        <option value="1" <?php if(@isset($student->has_504) && 1 === $student->has_504): ?> selected <?php endif; ?>>Yes</option>
                    </select>
                    <?php $__errorArgs = ['has_504'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('has_504')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <label for="notes">Notes</label>
            <div class="form-row">
                <div class="col-md-12 mb-4">
                    <textarea class="form-control" aria-label="With textarea" id="notes" name="notes"
                        placeholder="Student notes...">
<?php if(isset($student->notes)): ?>
<?php echo e($student->notes); ?>

<?php else: ?>
<?php echo e(old('notes')); ?>

<?php endif; ?>
</textarea>
                    <?php $__errorArgs = ['notes'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid-feedback" style="display: block !important;">
                            <?php echo e($errors->first('notes')); ?>

                        </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <div class="form-row">
                <button type="submit" class="mt-4 btn btn-primary">Submit</button>
                <button type="button" class="mt-4 ml-4 btn btn-secondary"
                    onclick="window.history.go(-1); return false;">Cancel</button>
            </div>
        </div>
    </form>
<?php $__env->stopSection(); ?>
<!--  BEGIN PAGE SCRIPTS FILE  -->
<?php $__env->startSection('page-js'); ?>
    <script src="/cork/src/assets/js/scrollspyNav.js"></script>
    <script src="/cork/src/plugins/src/flatpickr/flatpickr.js"></script>
    <script>
        var f1 = flatpickr(document.getElementById('dob'));
    </script>
<?php $__env->stopSection(); ?>
<!--  END PAGE SCRIPTS FILE  -->

<?php echo $__env->make('layouts.cork', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/psjybwmy/public_html/registration/resources/views/admin/students/form.blade.php ENDPATH**/ ?>