@extends('layouts.master')

@section('content')

@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>
                {!! session('message') !!}
              </div>
              </div> 
@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">Add New Supplier - اضافة مورد جديد  </h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form   role="form" method="POST" action="{{ url('/supplier/create') }}" enctype="multipart/form-data">
                        {{ csrf_field() }}
              <div class="box-body">
                
                
                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Name - الاسم</label>
                  <input type="text" name="name" class="form-control"  placeholder="Supplier Name - اسـم المورد " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Address - العنوان</label>
                  <input type="text" name="address" class="form-control"  placeholder="Supplier Address - عنون المورد " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Phone - رقم الهاتف </label>
                  <input type="text" name="phone" class="form-control"  placeholder="Supplier Phone - رقم الهاتف " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Fax - الفاكس</label>
                  <input type="text" name="fax" class="form-control"  placeholder="Supplier Fax - الفاكس " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Supplier Email - الايميل</label>
                  <input type="text" name="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" class="form-control"  placeholder="Environmental Response - المسؤل البيئي " required>
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Response Position - دور المسؤل</label>
                  <input type="text" name="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" class="form-control"  placeholder="Response Phone - رقم الهاتف المسؤل " required>
                </div>

                <div class="form-group">
                  <label for="exampleInputPassword1">Response Email - ايميل المسؤل</label>
                  <input type="text" name="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" 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" 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" 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" class="form-control"  placeholder="Industrial Registration No - رقم التسجيل الصناعي " required>
                </div>

                
                <div class="form-group">
                <label>Select Industrial City</label>
                <select class="form-control select2" style="width: 100%;" name="industrial_city_id" id="industrial_city_id" required>
                  @foreach( $citys as $city ) 
                  <option value="{{ $city->id }}">{{$city->name}}</option>
                  @endforeach
                </select>
                </div>
                

                
                

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

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

@endsection