<?php $__env->startSection('title', 'School year'); ?>
<?php $__env->startSection('content'); ?>
<div class="pcoded-inner-content">
    <div class="main-body">
        <div class="page-wrapper">
            <div class="page-body">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="card">
                            <div class="card-header mb-0 pb-0">
                                <div class="d-flex justify-content-between pb-2">
                                    <h4><?php echo e($data ? 'Edit ':'Add New '); ?>School Year</h4>
                                    <span class="form-control-variant">Les champ avec asterisk (<code>*</code>) sont obligatoires.</span>
                                    <span>
                                        <a href="<?php echo e(route('school_year.index')); ?>" class="btn btn-inverse btn-outline-inverse  btn-sm py-1" title="Return Back"><i class="fas fa-reply mx-0"></i></a>
                                    </span>
                                </div>
                            </div>
                            <hr class="my-0 mx-3">
                            <div class="card-block my-3 px-5">
                                <form action="<?php echo e(route($data ? 'school_year.update':'school_year.store', $data ? $data->id:'')); ?>" method="post">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field($data ? 'put':'post'); ?>
                                    <div class="form-group row my-3">
                                        <label class="col-sm-2 col-form-label" for="schoolYear">Année scolaire<span class="text-danger">*</span> :</label>
                                        <div class="col-sm-10">
                                            <input type="text" name="schoolYear" id="schoolYear" class="form-control form-control-normal <?php $__errorArgs = ['schoolYear'];
$__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); ?>" value="<?php echo e(old('schoolYear',$data ? $data->school_year:'')); ?>" placeholder="Année scolaire (2024-2025)">
                                            <?php $__errorArgs = ['schoolYear'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="form-bar text-danger" role="alert">
                                                    <?php echo e($message); ?>

                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label class="col-sm-2 col-form-label" for="sexeUser">Découpage<span class="text-danger">*</span> :</label>
                                        <div class="col-sm-10">
                                           <?php $__currentLoopData = $decoupage; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $decoup): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="form-check form-check-inline">
                                                <label class="form-check-label">
                                                    <input type="radio" name="decoupage" id="<?php echo e($decoup); ?>" class="form-check-input" value="<?php echo e($decoup); ?>" <?php echo e(old('sexe') == $decoup ? 'checked':null); ?> <?php echo e($data ? ($data->decoupage == $decoup ? 'checked':''):''); ?>> <?php echo e(ucfirst($decoup)); ?>

                                                </label>
                                            </div>
                                           <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                           <br>
                                           <?php $__errorArgs = ['decoupage'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="form-bar text-danger" role="alert">
                                                    <?php echo e($message); ?>

                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                    <?php if($data): ?>
                                    <div class="form-group row">
                                        <label class="col-sm-2 col-form-label" ></label>
                                        <div class="col-sm-10">
                                            <input type="checkbox" name="status" id="status" <?php echo e($data->status ? 'checked':''); ?>>
                                            <label for="status" class="mx-1 form-control-variant"><?php echo e($data->status ? 'Actif':'Inactif'); ?></label>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                                    <div class="text-center">
                                        <button type="submit" class="btn btn-inverse btn-outline-inverse py-2"> <i class="fas fa-check-circle"></i> Valider cette étape</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script src="<?php echo e(asset('assets/js/pcoded.min.js')); ?>"></script>
<script src="<?php echo e(asset('assets/js/vartical-layout.min.js')); ?>"></script>
<script src="<?php echo e(asset('assets/js/jquery.mCustomScrollbar.concat.min.js')); ?>"></script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/educasnsa/public_html/neuroschool/resources/views/pages/school_year/create.blade.php ENDPATH**/ ?>