@extends('master')

@section('content')
<!-- crops content -->
<div class="right_col" role="main">
  <div class="row x_panel">
    <div class="col-md-12 col-sm-12 col-xs-12">
    <h1>Edit Crops</h1>
<?php if(isset($data)){ ?>
<form action="<?php echo url('/'); ?>/admin/crops/edit" id="" class="form-horizontal " method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<input type="hidden" name="crp_id" value="<?php echo $data->crp_id; ?>">


<!-- Crop Start -->
<div class="form-group">
  <label for="crop" class="col-sm-3 control-label"> Crop </label>
  <div class="col-sm-4">
    <input type="text" class="form-control" id="crop" name="crop" 
    
    value="{{{ $data->crop }}}"
    >
  </div>
  <div class="col-sm-5">
         <div class="label label-danger">{{ $errors->first("crop") }}</div>
      </div>
</div> 
<!-- Crop End -->



	<!-- Status Start -->
	 <div class="form-group">
        <label class="control-label col-md-3">Status
             
        </label>                    
         <div class=" col-md-4 switch">
                    <div class="onoffswitch">
     <input type="checkbox" class="onoffswitch-checkbox"  data-on-label="Yes" data-off-label="No"  name="status" value="{{{ $data->status }}}" id="status" <?php if($data->status == 1){echo "checked=checked";}?> style="width:20px; height:20px;"/>
                    </div>
                </div>
      </div>
      <!-- Status End -->


  <div class="form-group">
  <div class="col-sm-3">
  </div>
   <div class="col-sm-6">
    <button type="reset" class="btn btn-default ">Reset</button>
    <button type="submit" class="btn btn-info ">Update</button>
   </div>
  </div>
</form>
<?php } else{
    echo '<h2 align="center" class="text-danger">No record found!</h2>';
  } ?>
    </div>
  </div>
</div>
<!-- /crops content -->
@endsection