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

              <div class="box-body">
                
                
                 


                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Name - الاسم</label>
                  <input type="text" name="name" value="<?php echo e($supplier->name); ?>" class="form-control"  placeholder="Supplier Name - اسـم المورد " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Address - العنوان</label>
                  <input type="text" name="address" value="<?php echo e($supplier->address); ?>" class="form-control"  placeholder="Supplier Address - عنون المورد " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Phone - رقم الهاتف </label>
                  <input type="text" name="phone" value="<?php echo e($supplier->phone); ?>" class="form-control"  placeholder="Supplier Phone - رقم الهاتف " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Fax - الفاكس</label>
                  <input type="text" name="fax" value="<?php echo e($supplier->fax); ?>" class="form-control"  placeholder="Supplier Fax - الفاكس " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Email - الايميل</label>
                  <input type="text" name="email" value="<?php echo e($supplier->email); ?>" class="form-control"  placeholder="Supplier Email - الايميل " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Environmental Response - المسؤل البيئي</label>
                  <input type="text" name="environmental_response" value="<?php echo e($supplier->environmental_response); ?>" class="form-control"  placeholder="Environmental Response - المسؤل البيئي " required>
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Response Position - دور المسؤل</label>
                  <input type="text" name="resp_position"  value="<?php echo e($supplier->resp_position); ?>" class="form-control"  placeholder="Response Position - دور المسؤل " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Response Phone - رقم الهاتف المسؤل</label>
                  <input type="text" name="resp_phone"  value="<?php echo e($supplier->resp_phone); ?>" class="form-control"  placeholder="Response Phone - رقم الهاتف المسؤل " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Response Email - ايميل المسؤل</label>
                  <input type="text" name="resp_email" value="<?php echo e($supplier->resp_email); ?>" class="form-control"  placeholder="Response Email - ايميل المسؤل " required>
                </div>


                <div class="form-group">
                  <label for="exampleInputPassword1">Commertial Registration No - رقم التسجيل التجاري</label>
                  <input type="text" name="commertial_registration_no" value="<?php echo e($supplier->commertial_registration_no); ?>" class="form-control"  placeholder="Commertial Registration No - رقم التسجيل التجاري " required>
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Tax Card No - رقم الضريبي</label>
                  <input type="text" name="tax_card_no" value="<?php echo e($supplier->tax_card_no); ?>" class="form-control"  placeholder="Tax Card No - رقم الضريبي " required>
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Operating Licence No - رخصة التشغيل</label>
                  <input type="text" name="operating_licence_no" value="<?php echo e($supplier->operating_licence_no); ?>" class="form-control"  placeholder="Operating Licence No - رخصة التشغيل " required>
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Industrial Registration No - رقم التسجيل الصناعي</label>
                  <input type="text" name="industrial_registration_no" value="<?php echo e($supplier->industrial_registration_no); ?>" class="form-control"  placeholder="Industrial Registration No - رقم التسجيل الصناعي " required>
                </div>

                

                <div class="form-group">
                <label>Industrial City - المدينة الصناعية</label>
                <select class="form-control select2" style="width: 100%;" name="industrial_city_id" id="industrial_city_id" required>
                  <?php foreach( $citys as $city ): ?> 
                  <option value="<?php echo e($city->id); ?>" <?php echo e($supplier->industrial_city_id == $city->id ? 'selected' : ''); ?>><?php echo e($city->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>

                <div   class="col-xs-6">
                <img   src='<?php echo e(asset("$supplier->logo")); ?>'  alt="User Image" style="width:100px;height:100px;">
                </div>

                <div   class="col-xs-6">
                    <label for="exampleInputPassword1">لوجو المورد </label>
                    <input type="file" id="image" name="image" class="form-control"  accept="image/*"  >
                    
                </div>

               <input type="hidden" name="supplier_id" value="<?php echo e($supplier->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(); ?>