<?php $__env->startSection('content'); ?>
    <div class="container-fluid">
        <div class="page-titles">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo e(URL::to('/facility')); ?>">Facility</a></li>
                <li class="breadcrumb-item active"><a href="<?php echo e(URL::to('/facility')); ?>">Facility</a></li>
            </ol>
        </div>
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-primary">
                        <div class="card-header">
                            <b>Show Facility</b>
                        </div>
                        <div class="card-body">
                            <form id="organisation_form" class="form-horizontal" action="<?php echo e(URL::to('/show_facility_post')); ?>" method="post" onsubmit="return validation();" autocomplete="off" enctype="multipart/form-data">
                                <?php echo e(csrf_field()); ?>

                                <div class="form-group col-6">
                                    <label>Organisation</label>
                                    <select id="organisation_id" name="organisation_id" class="form-control" required>
                                        <option value="">Choose Organisation</option>
                                        <?php $__currentLoopData = $organisations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $organisation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($organisation->id); ?>" <?php echo e($facilities->organisation_id == $organisation->id ? 'selected' : ''); ?>><?php echo e($organisation->organisation_name); ?>&nbsp;&nbsp;<?php echo e($organisation->city); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>    
                                    </select>
                                </div>
                                <div class="form-row">
                                    <div class="form-group col-6">
                                        <label>Facility Name</label>
                                        <input type="text" class="form-control" id="facility_name" name="facility_name" placeholder="Enter Facility Name" required maxlength="250" value="<?php echo e($facilities->facility_name); ?>">
                                        <input type="hidden" name="facility_id" id="facility_id" value="<?php echo e($facilities->id); ?>">
                                    </div>
                                    <div class="form-group col-3">
                                        <label>Facility Short Code</label>
                                        <input type="text" class="form-control" id="short_code" name="short_code" placeholder="Enter Facility Short Code" required maxlength="250" value="<?php echo e($facilities->short_code); ?>">
                                    </div>
                                    <div class="form-group col-3">
                                        <label>Order By</label>
                                        <input type="text" name="order_by" id="order_by" class="form-control" maxlength="3" onkeypress="return isNumber(event);" placeholder="Enter Facility Order By" value="<?php echo e($facilities->order_by); ?>">
                                    </div>
                                </div>
                                <div class="form-row">
                                    <div class="form-group col-6">
                                        <label>Number of Seats</label>
                                        <input type="text" class="form-control" id="noofseats" name="noofseats" placeholder="Enter Number of Seats" value="<?php echo e($facilities->noofseats); ?>" maxlength="3" onkeypress="return isNumber(event);">
                                    </div>
                                    <div class="form-group col-6">
                                        <label>Maximum Ticket per Person</label>
                                        <input type="text" class="form-control" id="maxticketperperson" name="maxticketperperson" placeholder="Enter Maximum Ticket per Person" value="<?php echo e($facilities->maxticketperperson); ?>" maxlength="3" onkeypress="return isNumber(event);">
                                    </div>
                                </div>
                                <div class="form-row">
                                    <div class="form-group col-3">
                                        <label>Fixed Show Time ?</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <?php if($facilities->timedshowflag==1): ?>
                                            <input type="checkbox" checked="checked" name="timedshowflag" id="timedshowflag" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger" data-size="xs" data-style="ios" value="1">
                                        <?php elseif($facilities->timedshowflag==0): ?>
                                            <input type="checkbox" name="timedshowflag" id="timedshowflag" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger" data-size="xs" data-style="ios" value="1">
                                        <?php endif; ?>
                                    </div>
                                    <div class="form-group col-3">
                                        <label>Fixed Seat ?</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <?php if($facilities->fixedseatflag==1): ?>
                                            <input type="checkbox" checked="checked" name="fixedseatflag" id="fixedseatflag" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger" data-size="xs" data-style="ios" value="1">
                                        <?php elseif($facilities->fixedseatflag==0): ?>
                                            <input type="checkbox" name="fixedseatflag" id="fixedseatflag" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger" data-size="xs" data-style="ios" value="1">
                                        <?php endif; ?>
                                    </div>
                                    
                                    <div class="form-group col-3">
                                        <label>Active</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <?php if($facilities->active_flag==1): ?>
                                            <input type="checkbox" checked="checked" name="active_flag" id="active_flag" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger" data-size="xs" data-style="ios" value="1">
                                        <?php elseif($facilities->active_flag==0): ?>
                                            <input type="checkbox" name="active_flag" id="active_flag" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger" data-size="xs" data-style="ios" value="1">
                                        <?php endif; ?>
                                    </div>
                                </div>
                                <div class="card-footer">
                                    <button type="submit" class="btn btn-primary">Submit</button>
                                    <a href="<?php echo e(URL::to('/facility')); ?>" title="View Facility" class="btn btn-warning">Back</a>
                                </div>
                            </form>      
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="application/javascript">
        /////////validate integer fields///////////////////////////
        function isNumber(evt) 
        {
          evt = (evt) ? evt : window.event;
          var charCode = (evt.which) ? evt.which : evt.keyCode;
          if (charCode > 31 && (charCode < 48 || charCode > 57)) 
          {
            //alert("Please enter only Numbers.");
            return false;
          }

          return true;
        }
        /////////////////////////////////////////////////////////////////
        $(document).ready(function() {
            toastr.options.timeOut = 10000;
            <?php if(Session::has('error')): ?>
                toastr.error('<?php echo e(Session::get('error')); ?>');
            <?php elseif(Session::has('success')): ?>
                toastr.success('<?php echo e(Session::get('success')); ?>');
            <?php endif; ?>
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.default', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/ksstmprod/resources/views/Facility/show_facility.blade.php ENDPATH**/ ?>