<!-- Modal ADD CONTRACT -->
<div class="modal fade" id="md_add_contract" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  {{ Form::open(array('route' => 'contract.store', 'class' => 'cls_form','id'=>'form_add_contract','enctype' => 'multipart/form-data')) }}
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Add Contract</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>
      <div class="modal-body ">
        <div class = "card">
          <div class ="card-body form-fieldset">
          <div class="row">


          <div class="col-sm-4">
              <label class="label-color"> Select Employee : <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('employee',":message") }}</small>

            <div class="input-group mb-3">
              <select name="employee" class="form-control form-control-sm cls_selection employee_list" onChange = "getEmployeeInfo(event,this)">

                 @foreach($employee_list as $rows)
                 <option value="{{Crypt::encrypt($rows->id)}}">{{$rows->name}}
                 </option>
                 @endforeach
                </select>
            </div>
          </div>

           <div class="col-sm-4">
              <label class="label-color">Type: <i style = "color:red;"></i></label>
            <input type ="text" placeholder = "Employee Type" readonly="true" class="employee_type form-control form-control-sm"/>
            
          </div>
     
               <div class="col-sm-4">
                <label class="label-color" >Designation:  <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('designation',":message") }}</small>

            <div class="input-group mb-3">
              <select name="designation" class="form-control form-control-sm cls_selection">

                 @foreach($designation_list as $rows)
                 <option value="{{Crypt::encrypt($rows->id)}}">{{$rows->title}}
                 </option>
                 @endforeach
                </select>
            </div>
          </div>

           <input type = "hidden" value="{{Crypt::encrypt(0)}}" name = "scale" />
          {{--

                   <div class="col-sm-12">
              <label class="label-color"> Select Scale: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('scale',":message") }}</small>

            <div class="input-group mb-3">
              <select name="scale" class="form-control form-control-sm cls_selection designation_list">
                  <option value="{{Crypt::encrypt(0)}}">Select Scale</option>

                 @foreach($scale_list as $rows)
                 <option value="{{Crypt::encrypt($rows->id)}}">{{$rows->code}} {{$rows->title}}
                 </option>
                 @endforeach
                </select>
            </div>
          </div>


            
            <div class="col-sm-12">
              <label class="label-color"> Select Location: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('location',":message") }}</small>

            <div class="input-group mb-3">
              <select name="location" class="form-control form-control-sm cls_selection">
                  <option value="0">Select Location</option>

                 @foreach(EF::getLocationList() as $rows)
                 <option value="{{$rows}}">{{$rows}}</option>
                 @endforeach
                </select>
            </div>
          </div>
          --}}
   

          <div class="col-sm-6">
              <label class="label-color"> Start Date : <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('start_date',":message") }}</small>

            <div class="input-group mb-3">
              {{Form::date('start_date', '', ['class' => 'form-control form-control-sm cls_date', 'placeholder' => 'Start Date' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])}}
            </div>
          </div>


          <div class="col-sm-6">
              <label class="label-color"> End Date : <i style = "color:red;"></i></label>
            <small class="form-errors pull-right req" value="">{{ $errors->first('end_date',":message") }}</small>

            <div class="input-group mb-3">
              {{Form::date('end_date', '', ['class' => 'form-control form-control-sm cls_date', 'placeholder' => 'End Date' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])}}
            </div>
          </div>

          <div class="col-sm-12">
              <label class="label-color"> Basic Salary : <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('basic_salary',":message") }}</small>

            <div class="input-group mb-3">
              {{Form::number('basic_salary', '', ['class' => 'form-control form-control-sm cls_required', 'placeholder' => 'Basic Salary' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','onkeyup' => 'numberInWordsValue(this,"salary_in_words")'])}}
            </div>
          </div>

          <div class="col-sm-12">
              <label class="label-color"> Amount In Words : </label>
            <small class="form-errors pull-right" value="">{{ $errors->first('amount_in_words',":message") }}</small>

            <div class="input-group mb-3">
              {{Form::Text('amount_in_words', '', ['class' => 'form-control form-control-sm salary_in_words', 'placeholder' => 'Salary In Words' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','disabled' => 'true'])}}
            </div>
          </div>

              
          <div class="col-sm-12">
            <label class="label-color">{{ucwords(EF::branchWhiteLabel()['module'])}}: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('branch',":message") }}</small>

           <div class="input-group mb-3">
            
               @php($branch_label = EF::branchWhiteLabel())
                  <select name="{{$branch_label['module']}}" class="form-control form-control-sm cls_selection branch" id="b_id" onChange="getPlotTypeList(event,this)">
                 
                    @foreach($branch as $rows)
                      <option @if(isset($current_branch) && $rows->id === $current_branch) selected  @endif value="{{Crypt::encrypt($rows->id)}}">{{$rows->code}} {{$rows->name}}</option>
                    @endforeach
                  </select>
                  
            </div>
        </div>

                              <div class="col-md-12">
                            <label class="label-color">Upload Document:</label>
                               <small class="form-errors pull-right " value="">{{ $errors->first('contract_form',":message") }}</small>
                               <div class="input-group mb-3">
                                 <div class="input-group-prepend">
                                   <span class="input-group-text" id="inputGroup-sizing-default">
                                     <i class="fa fa-file "></i>
                                   </span>
                                 </div>
                                 <input type="file" name="contract_form" class="form-control form-control-sm btn-xsm" required>
                                <div class="input-group-prepend">
                                   <span class="input-group-text" id="inputGroup-sizing-default">
                                     <i class ="userimage" >PDF,DOC,DOCX,XLS</i>
                                   </span>
                                 </div>

                               </div>
                             </div>

          

          
         </div>

          </div>
        </div>
       
   
         

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit"  class="btn btn-primary cls_submit" content="add contract">Add Contract</button>
      </div>
    </div>
  </div>
  {{ Form::close() }}
</div>
<!-- END MODAL ADD BANK -->