<!-- Modal UPDATE LEAVE -->
<div class="modal fade" id="md_update_leave" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  {{ Form::open(array('route' => 'leave.update', 'class' => 'cls_form','id'=>'form_update_leave')) }}
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Update Leave</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-6">
           
            <label class="label-color">Employee Name : <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('employee_name',":message") }}</small>

            <div class="input-group mb-3">
              <input type="text" readonly="" name="employee_name" class="form-control form-control-sm">
            </div>
          </div>


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

                <div class="input-group mb-3">
                  <select name="type" class="form-control form-control-sm cls_selection" onchange="showLeaveType(event,this)">
                                                
                    <option value="{{Crypt::encrypt(0)}}">Select Type</option>
                            
                    @foreach (EF::getLeavesTypeList() as $rows)
                      <option value="{{$rows}}">{{$rows}}</option>     
                    @endforeach
                                               
                  </select>
                </div>
          </div>
                                        

          <div class="col-sm-6 permanent-section">
              <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 hidden form-control-sm cls_date', 'placeholder' => 'Start Date' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])}}
            </div>
          </div>


          <div class="col-sm-6 permanent-section">
            <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 hidden form-control-sm cls_date', 'placeholder' => 'End Date' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])}}
            </div>
          </div>


          <div class="col-sm-12 short-section hid">
              <label class="label-color"> Number Of Hours : <i style = "color:red;"></i></label>
            <small class="form-errors pull-right req" value="">{{ $errors->first('no_of_hours',":message") }}</small>

            <div class="input-group mb-3">
              {{Form::number('no_of_hours', '', ['class' => 'form-control form-control-sm cls_required', 'placeholder' => 'Number Of Hours', 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])}}
            </div>
          </div>



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

            <div class="input-group mb-3">
              {{Form::textarea('reason', '', ['class' => 'form-control form-control-sm cls_required', 'placeholder' => 'Reason' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default', 'rows' => 4, 'cols' => 54])}}
            </div>
          </div> 
          
          <div class="col-sm-12">
              <label class="label-color"> Status : <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*">{{ $errors->first('status',":message") }}</small>

            <div class="input-group mb-3">
              <select name="status" class="form-control form-control-sm cls_selection"> 
                <option value="Approved">Approved</option>
                <option value="Pending">Pending</option>
              </select>
            </div>
          </div> 

          
          
         </div>

          </div>
        </div>
       
   
         

      </div>
      <div class="modal-footer">
        <input type="hidden" name="leave" value="">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit"  class="btn btn-primary cls_submit" content="update leave">Update Leave</button>
      </div>
    </div>
  </div>
  {{ Form::close() }}
</div>
<!-- END MODAL UPDATE LEAVE -->