@extends('layouts.app')
  @extends('master')
	@section('content')
	<div class="row">
		<div class="col-md-12">
			<center><h1>Edit Data Client</h1></center>
		</div>
	</div>

	<div class="row">
	  <div class="col-md-12">
		<form class="" action="{{route('person.update', $person->id)}}" method="post">
		<input type="hidden" name="_method" value="PATCH">
		{{csrf_field()}}
		  <div class="form group{{ ($errors->has('image')) ? $errors->first('image') : '' }}">
		  <input type="file" name="image" placeholder="Image">
		  {!! $errors->first('image', '<p class="help-block">:message</p>') !!}
		  </div>	
		  <div class="form group{{ ($errors->has('fullnames')) ? $errors->first('fullnames') : '' }}">
		  <input type="text" name="fullnames" class="form-control" placeholder="Fullnames" value="{{$person->fullnames}}">
		  {!! $errors->first('fullnames', '<p class="help-block">:message</p>') !!}
		  </div>	
		  <div class="form group{{ ($errors->has('Sex')) ? $errors->first('Sex') : '' }}">
		  <input type="text" name="sex" class="form-control" placeholder="Sex" value="{{$person->sex}}">
		  {!! $errors->first('sex', '<p class="help-block">:message</p>') !!}
		  </div>	
		  <div class="form group{{ ($errors->has('identitycard')) ? $errors->first('identitycard') : '' }}">
		  <input type="text" name="identitycard" class="form-control" placeholder="Identity Card" value="{{$person->identitycard}}">
		  {!! $errors->first('identitycard', '<p class="help-block">:message</p>') !!}
		  </div>
		  <div class="form group{{ ($errors->has('birthdate')) ? $errors->first('birthdate') : '' }}">
		  <input type="text" name="birthdate" class="form-control" placeholder="BirthDate" value="{{$person->birthdate}}">
		  {!! $errors->first('birthdate', '<p class="help-block">:message</p>') !!}
		  </div>	
		  <div class="form group{{ ($errors->has('province')) ? $errors->first('province') : '' }}">
		  <input type="text" name="province" class="form-control" placeholder="Province" value="{{$person->province}}">
		  {!! $errors->first('province', '<p class="help-block">:message</p>') !!}
		  </div>
		  <div class="form group{{ ($errors->has('district')) ? $errors->first('district') : '' }}">
		  <input type="text" name="district" class="form-control" placeholder="District" value="{{$person->district}}">
		  {!! $errors->first('district', '<p class="help-block">:message</p>') !!}
		  </div>
		  <div class="form group{{ ($errors->has('sector')) ? $errors->first('sector') : '' }}">
		  <input type="text" name="sector" class="form-control" placeholder="Sector" value="{{$person->sector}}">
		  {!! $errors->first('sector', '<p class="help-block">:message</p>') !!}
		  </div>
		  <div class="form group{{ ($errors->has('cellar')) ? $errors->first('cellar') : '' }}">
		  <input type="text" name="cellar" class="form-control" placeholder="Cellar" value="{{$person->cellar}}">
		  {!! $errors->first('cellar', '<p class="help-block">:message</p>') !!}
		  </div>		  		  		  	
		  <div class="form-group">
		  	  <input type="submit" class="btn btn-primary" value="Save">
		  </div>  	  		  	  	  		
			</form>
		</div>
	</div>	
@stop	