@extends('layouts.app')

@section('content')
<div class="page-header"><h2> {{ $pageTitle }} <small> {{ $pageNote }} </small> </h2></div>

	{!! Form::open(array('url'=>'illness?return='.$return, 'class'=>'form-horizontal validated','files' => true )) !!}
	<div class="toolbar-nav">
		<div class="row">
			
			<div class="col-md-6 " >
				<button name="apply" class="tips btn btn-sm btn-default  "  title="{{ __('core.btn_back') }}" ><i class="fa  fa-check"></i> {{ __('core.sb_apply') }} </button>
				<button name="save" class="tips btn btn-sm btn-default"  title="{{ __('core.btn_back') }}" ><i class="fa  fa-paste"></i> {{ __('core.sb_save') }} </button> 
			</div>
			<div class="col-md-6 text-right " >
				<a href="{{ url($pageModule.'?return='.$return) }}" class="tips btn btn-sm "  title="{{ __('core.btn_back') }}" ><i class="fa  fa-times"></i></a> 
			</div>
		</div>
	</div>	


	<div class="p-5">
		<ul class="parsley-error-list">
			@foreach($errors->all() as $error)
				<li>{{ $error }}</li>
			@endforeach
		</ul>		
		<div class="row">
	<div class="col-md-12">
						<fieldset><legend> Dossier maladie</legend>
				{!! Form::hidden('id', $row['id']) !!}					
									  <div class="form-group row  " >
										<label for="Compagnie" class=" control-label col-md-4 text-left"> Compagnie <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='cie' id='cie' value='{{ $row['cie'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Police" class=" control-label col-md-4 text-left"> Police <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='police' id='police' value='{{ $row['police'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Nom adhérent" class=" control-label col-md-4 text-left"> Nom adhérent <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='adherent_last_name' id='adherent_last_name' value='{{ $row['adherent_last_name'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Prénom adhérent" class=" control-label col-md-4 text-left"> Prénom adhérent <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='adherent_first_name' id='adherent_first_name' value='{{ $row['adherent_first_name'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Matricule" class=" control-label col-md-4 text-left"> Matricule <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='matricule' id='matricule' value='{{ $row['matricule'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Nom patient" class=" control-label col-md-4 text-left"> Nom patient <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='patient_last_name' id='patient_last_name' value='{{ $row['patient_last_name'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Prénom patient" class=" control-label col-md-4 text-left"> Prénom patient <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='patient_first_name' id='patient_first_name' value='{{ $row['patient_first_name'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Lien parenté" class=" control-label col-md-4 text-left"> Lien parenté <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='relationship' id='relationship' value='{{ $row['relationship'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date visite" class=" control-label col-md-4 text-left"> Date visite <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='visit_date' id='visit_date' value='{{ $row['visit_date'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Nature maladie" class=" control-label col-md-4 text-left"> Nature maladie <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='disease_nature' id='disease_nature' value='{{ $row['disease_nature'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Montant engagé" class=" control-label col-md-4 text-left"> Montant engagé <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='committed_amount' id='committed_amount' value='{{ $row['committed_amount'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Montant remboursement" class=" control-label col-md-4 text-left"> Montant remboursement <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='advanced_amount' id='advanced_amount' value='{{ $row['advanced_amount'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date remboursement" class=" control-label col-md-4 text-left"> Date remboursement <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='advanced_date' id='advanced_date' value='{{ $row['advanced_date'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Etat" class=" control-label col-md-4 text-left"> Etat <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='state' id='state' value='{{ $row['state'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> </fieldset>
			</div>
			
			
	
		</div>

		<input type="hidden" name="action_task" value="save" />
		
		</div>
	</div>		
	{!! Form::close() !!}
		 
   <script type="text/javascript">
	$(document).ready(function() { 
		
		
		 		 

		$('.removeMultiFiles').on('click',function(){
			var removeUrl = '{{ url("illness/removefiles?file=")}}'+$(this).attr('url');
			$(this).parent().remove();
			$.get(removeUrl,function(response){});
			$(this).parent('div').empty();	
			return false;
		});		
		
	});
	</script>		 
@stop