<?php $__env->startSection('header-script'); ?>
    <?php echo $__env->make('admin.layouts.forms-header-script', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>

    <?php $__env->startSection('content'); ?>
        <div class="row">
            <div class="col-sm-12">
                <div class="btn-group pull-right m-t-25">
                    <a  href="<?php echo e(URL::to('admin/event/list')); ?>"  class="btn btn-custom  waves-effect waves-light"  >All events <span class="m-l-5"><i class="fa fa-list" aria-hidden="true"></i></span></a>
                </div>
                <h4 class="page-title">Update Events</h4>
                <?php $__currentLoopData = ['danger', 'warning', 'success', 'info']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if(Session::has($key)): ?>
                        <p class="alert alert-<?php echo e($key); ?>"><i class="fa fa-info-circle" style="color: #fe6271;"></i> <?php echo e(Session::get($key)); ?></p>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
        
        <div class="row">
            <div class="col-sm-12">
                <div class="card-box">
                    <h4 class="header-title m-t-0 m-b-30">Update Event</h4>
                    <div class="row">
                        <div class="col-lg-6">
                            <div class="p-20">
                                <form class="form-horizontal" enctype="multipart/form-data" method="POST"
                                    action="<?php echo e(action('AdminController@eventUpdate', $eventedit->id)); ?>">
                                    <?php echo e(csrf_field()); ?>

                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Title <i style="color: red;">*</i></label>
                                        <div class="col-lg-10">
                                            <select class="form-control" name="title">
                                                <option selected>Please Select title</option>
                                                <?php $__currentLoopData = $sessions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $session): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($session->id); ?>" <?php if($session->id == $eventedit->title): ?> selected <?php endif; ?></option><?php echo e($session->title); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                            <!--<input class="form-control" name="title"  type="text" value="<?php echo e($eventedit->title); ?>"/>-->
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Images <i style="color: red;">*</i></label>
                                        <div class="col-lg-10">
                                            <small   class="form-text text-muted">Image Width 1050px &amp; Height 300px</small>
                                            <input type="file" name="image" id="filer_input2" value="<?php echo e($eventedit->image); ?>" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Event Category <i style="color: red;">*</i></label>
                                        <div class="col-lg-10">
                                            <select class="form-control" name="event_category" value="">
                                                <option selected>Please Select Category</option>
                                                <option value="upcoming" <?php if($eventedit->event_category == "upcoming"): ?> selected <?php endif; ?>>Upcoming</option>
                                                <option value="running" <?php if($eventedit->event_category == "running"): ?> selected <?php endif; ?>>Running</option>
                                                <option value="completed" <?php if($eventedit->event_category == "completed"): ?> selected <?php endif; ?>>Completed</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Start Date <i style="color: red;">*</i></label>
                                        <div class="col-lg-10">
                                            <input class="form-control" name="start_date"  type="date" value="<?php echo e($eventedit->start_date); ?>"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">End Date <i style="color: red;">*</i></label>
                                        <div class="col-lg-10">
                                            <input class="form-control" name="end_date"  type="date" value="<?php echo e($eventedit->end_date); ?>"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Location <i style="color: red;">*</i></label>
                                        <div class="col-lg-10">
                                            <input class="form-control" name="location"  type="text" value="<?php echo e($eventedit->location); ?>"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Description<i style="color: red;">*</i></label>
                                        <div class="col-lg-10">
                                            <textarea  id="editor" class="form-control" name="descriptions"><?php echo e($eventedit->descriptions); ?></textarea>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label"></label>
                                        <div class="col-lg-10">
                                            <button type="submit" class="btn btn-custom btn-bordred waves-effect waves-light w-md m-b-5 pull-left"><i class="fa  fa-save"></i> Update</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php $__env->stopSection(); ?>

 <?php $__env->startSection('footer-script'); ?>
     <?php echo $__env->make('admin.layouts.form-elements-footer-script', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
 <?php $__env->stopSection(); ?>
 
<?php echo $__env->make('admin.layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>