@extends('layouts.Layout')

@section('content')
<div class="col-md-12">
    <div class="card">
        <div class="header">
	        <h4 class="title">Ubah Data</h4>
	        <p class="category"></p>
	    </div>
	    <div class="content">
	    	<form action="{{route('periodik.update',$kartu->id)}}" method="POST">
	    	{{ csrf_field() }}
	    	<input type="hidden" name="_method" value="PUT">
	    	<input type="hidden" name="id_pendaftar" value="{{$kartu->id}}">

			<div class="row">
            	<div class="col-lg-2">
	                <div class="form-group @if($errors->has('tinggi_badan')) has-error @endif">
	                    <input type="text" placeholder="Tinggi badan (CM)" class="form-control border-input" value="{{$kartu->tinggi_badan}}" name="tinggi_badan">
	                    <span id="helpBlock2" class="help-block">{{$errors->first('tinggi_badan')}}</span>
	                </div>
	            </div>
		    	<div class="col-lg-2">
	                <div class="form-group @if($errors->has('berat_badan')) has-error @endif">
	                    <input type="text" placeholder="Berat badan (KG)" class="form-control border-input" value="{{$kartu->berat_badan}}" name="berat_badan">
	                    <span id="helpBlock2" class="help-block">{{$errors->first('berat_badan')}}</span>
	                </div>
	            </div>
		    	<div class="col-lg-3">
	                <div class="form-group @if($errors->has('jarak_kesekolah')) has-error @endif">
	                    <input type="text" placeholder="Jarak rumah ke sekolah (M)" class="form-control border-input" value="{{$kartu->jarak_kesekolah}}" name="jarak_kesekolah">
	                    <span id="helpBlock2" class="help-block">{{$errors->first('jarak_kesekolah')}}</span>
	                </div>
	            </div>

		    	<div class="col-lg-3">
	                <div class="form-group @if($errors->has('waktu_tempuh')) has-error @endif">
	                    <input type="text" placeholder="Waktu tempuh (Menit)" class="form-control border-input" value="{{$kartu->waktu_tempuh}}" name="waktu_tempuh">
	                    <span id="helpBlock2" class="help-block">{{$errors->first('waktu_tempuh')}}</span>
	                </div>
	            </div>

		    	<div class="col-md-2">
	                <div class="form-group @if($errors->has('jumlah_saudara')) has-error @endif">
	                    <input type="text" placeholder="Jumlah Saudara" class="form-control border-input" value="{{$kartu->jumlah_saudara}}" name="jumlah_saudara">
	                    <span id="helpBlock2" class="help-block">{{$errors->first('jumlah_saudara')}}</span>
	                </div>
	            </div>
	           </div>
	           <div class="row">
            	<div class="col-md-12">
            		<a href="{{ route('periodik.index')}}" class="btn btn-default">Cancel</a>
					<input type="submit" class="btn btn-default">
            	</div>
            </div>
	    	</form>
	    </div>
    </div>
</div>
@endsection