<?php $__env->startSection('content'); ?>
<?php if(session()->has('message')): ?>
<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
<div class="col-md-4 alert alert-success alert-dismissible" style="font-size:18px;font-weight:bold;width:400px;margin-left:15px">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <?php echo session('message'); ?>

              </div>
              </div> 
<?php endif; ?>

<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
        <div class="col-md-8">
          <!-- general form elements -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">Edit Permit  </h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form   role="form" method="POST" action="<?php echo e(url('/permit/edit')); ?>">
                        <?php echo e(csrf_field()); ?>

              <div class="box-body">
                
                
               
                <div class="form-group">
                  <label for="exampleInputPassword1">Permit Start Date - تاريخ بداية التصريح</label>
                  <input type="date" name="start"  value="<?php echo e($permit->start); ?>" class="form-control"  placeholder="Permit Start Date - تاريخ بداية التصريح " required>
                </div>


                <div class="form-group">
                  <label for="exampleInputPassword1">Permit End Date - تاريخ نهاية التصريح</label>
                  <input type="date" name="end"  value="<?php echo e($permit->end); ?>" class="form-control"  placeholder="Permit End Date - تاريخ نهاية التصريح " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Permit Comment - تعليق </label>
                  <input type="text" name="comment"  value="<?php echo e($permit->comment); ?>" class="form-control"  placeholder="Permit Comment - تعليق " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Permit Got From - صادر من </label>
                  <input type="text" name="sader_mn"  value="<?php echo e($permit->sader_mn); ?>" class="form-control"  placeholder="Permit Got From - صادر من " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Permit name - اسم </label>
                  <input type="text" name="name"  value="<?php echo e($permit->name); ?>" class="form-control"  placeholder="Permit name - اسم " required>
                </div>

                <div class="form-group">
                <label>Vehicle Number - رقم السيارة</label>
                <select class="form-control select2" style="width: 100%;" name="vehicle_id" id="vehicle_id" required>
                  <?php foreach( $vehicles as $vehicle ): ?> 
                  <option value="<?php echo e($vehicle->id); ?>" <?php if($permit->vehicle_id == $vehicle->id): ?> selected <?php endif; ?>><?php echo e($vehicle->vehicle_num); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>

               <input type="hidden" name="permit_id" value="<?php echo e($permit->id); ?>" class="form-control"  placeholder="" required>
              </div>
              <!-- /.box-body -->

              <div class="box-footer">
                <button type="submit" class="btn btn-success">Save</button>
              </div>
            </form>
          </div>    
</div>
         
      </div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>