<?php $__env->startSection("content"); ?>
<?php $__env->startSection("title","Add Leave Types"); ?>

<div class="row">
    <div class="col-xl-12 col-lg-12">
        <div class="alert alert-success my-3" style="display:none;" id="success"></div>
        
        <div class="card">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h4 class="card-title mb-0">Add Leave types</h4>
                <a href="javascript:history.back()" class="btn btn-sm btn-light">
                    <i class="ri-arrow-left-line"></i> Back
                </a>
            </div>
            
            <div class="card-body">
                <form accept-charset="utf-8" name="add-form" id="add-form" >
                    <?php echo csrf_field(); ?>
                    <div class="row">


<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_leave_types['name_req']); ?><?php echo e($dbs_leave_types['name_title']); ?>:</label>
        <input type = '<?php echo e($dbs_leave_types['name_html5_type']); ?>' name = "name" id = "add-name" autocomplete = 'off' maxlength ='<?php echo e($dbs_leave_types['name_max']); ?>'  value='' <?php if($dbs_leave_types['name_html5_req']!=''): ?> <?php echo e($dbs_leave_types['name_html5_req']); ?> = <?php echo e($dbs_leave_types['name_html5_req']); ?> <?php endif; ?> class= 'form-control'  >
        <span class='text-danger' id='add-nameError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_leave_types['allowed_days_req']); ?><?php echo e($dbs_leave_types['allowed_days_title']); ?>:</label>
        <input type = '<?php echo e($dbs_leave_types['allowed_days_html5_type']); ?>' name = "allowed_days" id = "add-allowed_days" data-maxlen='<?php echo e($dbs_leave_types['allowed_days_max']); ?>' data-scale='<?php echo e($dbs_leave_types['allowed_days_scale'] ?? ''); ?>' autocomplete = 'off'   value='' <?php if($dbs_leave_types['allowed_days_html5_req']!=''): ?> <?php echo e($dbs_leave_types['allowed_days_html5_req']); ?> = <?php echo e($dbs_leave_types['allowed_days_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateNumericInput(event)'  oninput='validateInput(this,<?php echo e($dbs_leave_types['allowed_days_max']); ?>)' />
        <span class='text-danger' id='add-allowed_daysError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_leave_types['status_req']); ?><?php echo e($dbs_leave_types['status_title']); ?>:</label><br/>
        <div class="mt-2">
            <?php
            $options = $dbs_leave_types['status_array'];
            ?>

            <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                $checked = ($key == 'Active') ? 'checked="checked"' : '';
                ?>

                <label class="btn btn-outline-primary">
                    <input type="radio" name="status" value="<?php echo e($key); ?>" id="add-status" <?php echo e($checked); ?>/> <?php echo e($value); ?>

                </label>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</div>

    
                    </div>
                    

                    <div class="p-3 mb-3 rounded">
                        <div class="row justify-content-end g-2">
                            <div class="col-lg-3">
                                <button type='submit' name='add-submit' id='add-submit' class='btn btn-outline-secondary w-100' data-args1='<?php echo e(route("leave-types.store")); ?>' data-args2='admin/leave-types' onclick='addUpdate(event, "add")'>
                                    <i class="ri-save-line"></i> Save 
                                </button>
                            </div>
                            <div class="col-lg-2">
                                <a href="<?php echo e(route('leave-types.index')); ?>" class="btn btn-primary w-100">
                                    <i class="ri-close-circle-line"></i> Cancel
                                </a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>


<?php echo $__env->make("layouts.metor.admin", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/payroll/resources/views/leave-types/create.blade.php ENDPATH**/ ?>