<?php $__env->startSection('title'); ?>
    Submit a <?php echo e($policy->name); ?> Request
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <form enctype="multipart/form-data" method="post"
          action="<?php echo e(URL::action('UserController@postSaveRequest')); ?>">
        <?php echo csrf_field(); ?>

        <div class="form-group">
            <div class="well-sm jumbotron h4">
                Policy:<br>
                <?php echo e($policy->information); ?>

            </div>
        </div>
        <?php if($policy->type == 'leave'): ?>
            <div class="form-group">
                <div class="help-block">
                    You currently have: <?php echo e($policy->leave_days); ?> Leave days
                </div>
            </div>
            <div class="form-group">
                <label for="from_date" class="control-label">
                    From
                </label>
                <input id="from_date" type="text" name="from_date" value="<?php echo e(old('from_date')); ?>"
                       class="form-control has-date-picker">
            </div>
            <div class="form-group">
                <label for="to_date" class="control-label">
                    To
                </label>
                <input id="to_date" type="text" name="to_date" value="<?php echo e(old('to_date')); ?>"
                       class="form-control has-date-picker">
            </div>
        <?php endif; ?>
        <div class="form-group">
            <label for="description" class="control-label">
                Add a Comment:
                <label class="required" aria-required="true">
                    *
                </label>
            </label>

            <textarea name="description" class="form-control" id="description"><?php echo e(old('description')); ?></textarea>
        </div>
        <?php if($policy->requires_attachment): ?>
            <div class="lead">
                Supply Documents:
            </div>
            <div class="form-group">
                <input name="files_attachment[]" type="file" class="form-control" id="files_attachment">
                <input name="files_attachment[]" type="file" class="form-control" id="files_attachment">
                <input name="files_attachment[]" type="file" class="form-control" id="files_attachment">
            </div>
        <?php endif; ?>
        <div class="form-actions text-center">
            <button type="submit" class="btn btn-green">
                Submit Request
            </button>
            <a href="<?php echo e(URL::action('UserController@getMyRequests')); ?>" class="btn btn-dark">
                Cancel
            </a>
        </div>
    </form>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>