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

<?php $__env->startSection('content_header', 'Settings <small>jobs</small>'); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <section class="col-lg-12">
            <div class="nav-tabs-custom">
                <?php echo $__env->make('admin.settings._partials.tabs', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <div class="tab-content">
                    <div class="tab-pane active">
                        <form class="form-horizontal" method="POST" action="<?php echo e(route('admin.settings.jobs.update')); ?>">
                            <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                            <?php if(count($errors) > 0): ?>
                                <div class="alert alert-danger alert-dismissable">
                                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                    <h4><i class="icon fa fa-ban"></i> <strong>Whoops!</strong> There were some problems with your input.</h4>
                                    <ul>
                                        <?php foreach($errors->all() as $error): ?>
                                            <li><?php echo e($error); ?></li>
                                        <?php endforeach; ?>
                                    </ul>
                                </div>
                            <?php endif; ?>
                            <div class="form-group <?php if($errors->has('auto_activate')): ?> has-error <?php endif; ?>">
                                <label for="inputJobsAutoActivate" class="col-sm-3 control-label">Automatic activation</label>
                                <div class="col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            <input name="auto_activate" type="hidden" value="0">
                                            <input name="auto_activate" id="inputJobsAutoActivate" type="checkbox" value="1" <?php if((bool) old('auto_activate', app('settings')->get('jobs.auto_activate'))): ?> checked <?php endif; ?>>
                                            Enabled
                                        </label>
                                    </div>
                                    <p class="help-block">When job is created activate it automatically.</p>
                                </div>
                            </div>
                            <hr>
                            <div class="form-group <?php if($errors->has('activate_for')): ?> has-error <?php endif; ?>">
                                <label for="inputJobsActivateFor" class="col-sm-3 control-label">Activate for</label>
                                <div class="col-sm-9">
                                    <input name="activate_for" type="text" class="form-control" id="inputJobsActivateFor" value="<?php echo e(old('activate_for', app('settings')->get('jobs.activate_for'))); ?>">
                                    <p class="help-block">When activating new jobs use this timespan.</p>
                                </div>
                            </div>
                            <hr>
                            <div class="form-group <?php if($errors->has('new_for')): ?> has-error <?php endif; ?>">
                                <label for="inputJobsNewFor" class="col-sm-3 control-label">New jobs</label>
                                <div class="col-sm-9">
                                    <input name="new_for" type="text" class="form-control" id="inputJobsNewFor" value="<?php echo e(old('new_for', app('settings')->get('jobs.new_for'))); ?>">
                                    <p class="help-block">When marking jobs as new use this timespan. Set "+0" to disable job marking.</p>
                                </div>
                            </div>
                            <hr>
                            <div class="form-group <?php if($errors->has('new_by')): ?> has-error <?php endif; ?>">
                                <label for="inputJobsNewBy" class="col-sm-3 control-label">Check new jobs by</label>
                                <div class="col-sm-9">
                                    <select name="new_by" id="inputJobsNewBy" class="form-control">
                                        <option value="created_at" <?php if(old('new_by', app('settings')->get('jobs.new_by')) == 'created_at'): ?> selected <?php endif; ?>>by creation date</option>
                                        <option value="active_from" <?php if(old('new_by', app('settings')->get('jobs.new_by')) == 'active_from'): ?> selected <?php endif; ?>>by activation date</option>
                                    </select>
                                    <p class="help-block">Field to check and mark new jobs by.</p>
                                </div>
                            </div>
                            <hr>
                            <div class="form-group <?php if($errors->has('highlight_featured')): ?> has-error <?php endif; ?>">
                                <label for="checkboxJobsHighlightFeatured" class="col-sm-3 control-label">Highlight featured</label>
                                <div class="col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            <input name="highlight_featured" type="hidden" value="0">
                                            <input name="highlight_featured" id="checkboxJobsHighlightFeatured" type="checkbox" value="1" <?php if((bool) old('highlight_featured', app('settings')->get('jobs.highlight_featured'))): ?> checked <?php endif; ?>>
                                            Yes
                                        </label>
                                    </div>
                                    <p class="help-block">Highlight featured jobs in main page.</p>
                                </div>
                            </div>
                            <hr>
                            <div class="form-group <?php if($errors->has('order_by_featured')): ?> has-error <?php endif; ?>">
                                <label for="checkboxJobsOrderByFeatured" class="col-sm-3 control-label">Order by featured</label>
                                <div class="col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            <input name="order_by_featured" type="hidden" value="0">
                                            <input name="order_by_featured" id="checkboxJobsOrderByFeatured" type="checkbox" value="1" <?php if((bool) old('order_by_featured', app('settings')->get('jobs.order_by_featured'))): ?> checked <?php endif; ?>>
                                            Yes
                                        </label>
                                    </div>
                                    <p class="help-block">Featured jobs will be show at the top of the list.</p>
                                </div>
                            </div>
                            <hr>
                            <div class="clearfix">
                                <div class="pull-right">
                                    <button type="submit" class="btn btn-success">Save</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </section>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>