<?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('years.index')); ?>">Years</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('years.store')); ?> <?php else: ?> <?php echo e(route('years.update', $year->id)); ?> <?php endif; ?>">
    <input type="hidden" name="year" id="year" <?php if(isset($year->start_date)): ?> value="<?php echo e($year->start_date); ?>" <?php else: ?> value="<?php echo e(old('start_date')); ?>" <?php endif; ?>>

    <?php echo csrf_field(); ?>
    <?php if($action == 'edit'): ?> <?php echo method_field('PUT'); ?> <?php endif; ?>
    <div class="form-group">

        <label for="start_date">Start Date</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <input type="text" class="form-control <?php $__errorArgs = ['start_date'];
$__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="start_date" id="start_date" aria-describedby="basic-addon3" placeholder="Start Date" maxlength="10" <?php if(isset($year->start_date)): ?> value="<?php echo e($year->start_date); ?>" <?php else: ?> value="<?php echo e(old('start_date')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['start_date'];
$__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('start_date')); ?>

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

        <label for="end_date">End Date</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <input type="text" class="form-control <?php $__errorArgs = ['end_date'];
$__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="end_date" id="end_date" aria-describedby="basic-addon3" placeholder="End Date" maxlength="10" <?php if(isset($year->end_date)): ?> value="<?php echo e($year->end_date); ?>" <?php else: ?> value="<?php echo e(old('end_date')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['end_date'];
$__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('end_date')); ?>

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

        <label for="member_cost">Member Per-Class Cost</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <input type="text" class="form-control <?php $__errorArgs = ['member_cost'];
$__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="member_cost" id="member_cost" aria-describedby="basic-addon3" placeholder="0.00" maxlength="11" <?php if(isset($year->member_cost)): ?> value="<?php echo e($year->member_cost); ?>" <?php else: ?> value="<?php echo e(old('member_cost')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['member_cost'];
$__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('member_cost')); ?>

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


        <label for="non_member_cost">Non-Member Per-Class Cost</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <input type="text" class="form-control <?php $__errorArgs = ['non_member_cost'];
$__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="non_member_cost" id="non_member_cost" aria-describedby="basic-addon3" placeholder="0.00" maxlength="11" <?php if(isset($year->non_member_cost)): ?> value="<?php echo e($year->non_member_cost); ?>" <?php else: ?> value="<?php echo e(old('non_member_cost')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['non_member_cost'];
$__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('non_member_cost')); ?>

                </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('start_date'));
    var f2 = flatpickr(document.getElementById('end_date'));
</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/years/form.blade.php ENDPATH**/ ?>