<?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 Waste  </h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form   role="form" method="POST" action="<?php echo e(url('/waste/edit')); ?>">
                        <?php echo e(csrf_field()); ?>

              <div class="box-body">
                
                
                <div class="form-group">
                  <label for="exampleInputPassword1">Waste Name - اسم المخلف</label>
                  <input type="text" name="name" value="<?php echo e($waste->name); ?>" class="form-control"  placeholder="Waste Name - اسم المخلف" required>
                </div>
                
                <div class="form-group">
                  <label for="exampleInputPassword1">Waste Unit - وحدة المخلف</label>
                  <input type="text" name="unit"  value="<?php echo e($waste->unit); ?>"  class="form-control"  placeholder="Waste Unit - وحدة المخلف " required>
                </div>

                <div class="form-group">
                <label>Class - الفـئـة</label>
                <select class="form-control select2" style="width: 100%;" name="class_id" id="class_id" required>
                  <?php foreach( $classes as $class ): ?> 
                  <option value="<?php echo e($class->id); ?>" <?php echo e($waste->class_id == $class->id ? 'selected' : ''); ?> > <?php echo e($class->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>

                <div class="form-group">
                <label>Classification - التصنيف</label>
                <select class="form-control select2" style="width: 100%;" name="classifications_id" id="classifications_id" required>
                  <?php foreach( $classifications as $classification ): ?> 
                  <option value="<?php echo e($classification->id); ?>" <?php echo e($waste->classifications_id == $classification->id ? 'selected' : ''); ?>><?php echo e($classification->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>

                <div class="form-group">
                <label>Group - المجموعة</label>
                <select class="form-control select2" style="width: 100%;" name="groups_id" id="groups_id" required>
                  <?php foreach( $groups as $group ): ?> 
                  <option value="<?php echo e($group->id); ?>"  <?php echo e($waste->groups_id == $group->id ? 'selected' : ''); ?>><?php echo e($group->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>

                <div class="form-group">
                <label>Recycler Methods- طرق اعادة الاستخدام</label>
                <select class="form-control select2" style="width: 100%;" name="reuse_methods_id" id="reuse_methods_id" required>
                  <?php foreach( $recycle_methods as $recycle_method ): ?> 
                  <option value="<?php echo e($recycle_method->id); ?>" <?php echo e($waste->reuse_methods_id == $recycle_method->id ? 'selected' : ''); ?>><?php echo e($recycle_method->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>
               <input type="hidden" name="waste_id" value="<?php echo e($waste->id); ?>" class="form-control"  placeholder="Waste Name - اسم المخلف" 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(); ?>