@extends('master')

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


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



    <!-- Card_image Start -->
    <div class="form-group">
      <label for="card_image" class="control-label col-md-3"> Card Image </label>
        <div class="col-md-4">
          <input type="file" id="card_image" name="card_image" /><br>
          <?php if($data->card_image!=''){
            echo '<img src="'.url('/')."/uploads/{$data->card_image}".'" style="width:100px;">'; 
            } ?>
            <input type="hidden" name="old_card_image" value="<?php echo $data->card_image; ?>">
      </div>
      <div class="col-sm-5">
          <div class="label label-danger">{{ $errors->first("card_image") }}</div>
      </div>
    </div>
    <!-- Card_image End -->

    

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



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



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



<!-- Url Start -->
<div class="form-group">
  <label for="url" class="col-sm-3 control-label"> Url </label>
  <div class="col-sm-4">
    <input type="text" class="form-control" id="url" name="url" 
    
    value="{{{ $data->url }}}"
    >
  </div>
  <div class="col-sm-5">
         <div class="label label-danger">{{ $errors->first("url") }}</div>
      </div>
</div> 
<!-- Url 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="1" 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>
<!-- /credit_offer content -->
@endsection