@extends('layouts.app')

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

	{!! Form::open(array('url'=>'sinistersdisease?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> Gestion des sinistres maladie</legend>
									
									  <div class="form-group row  " >
										<label for="Id Account" class=" control-label col-md-4 text-left"> Id Account <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_account' rows='5' id='id_account' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Cie" class=" control-label col-md-4 text-left"> Cie <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="Adherent Last Name" class=" control-label col-md-4 text-left"> Adherent Last Name <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="Adherent First Name" class=" control-label col-md-4 text-left"> Adherent First Name <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="Patient Last Name" class=" control-label col-md-4 text-left"> Patient Last Name <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="Patient First Name" class=" control-label col-md-4 text-left"> Patient First Name <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="Relationship" class=" control-label col-md-4 text-left"> Relationship <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="Visit Date" class=" control-label col-md-4 text-left"> Visit Date <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="Disease Nature" class=" control-label col-md-4 text-left"> Disease Nature <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="Committed Amount" class=" control-label col-md-4 text-left"> Committed Amount <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="Advanced Amount" class=" control-label col-md-4 text-left"> Advanced Amount <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="Advanced Date" class=" control-label col-md-4 text-left"> Advanced Date <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="State" class=" control-label col-md-4 text-left"> State <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> 
				<?php 
				$limited = isset($fields['comment']['limited']) ? $fields['comment']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Comment" class=" control-label col-md-4 text-left"> Comment <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='comment' id='comment' value='{{ $row['comment'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?>
				<?php 
				$limited = isset($fields['status']['limited']) ? $fields['status']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Status" class=" control-label col-md-4 text-left"> Status <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='status' id='status' value='{{ $row['status'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?>
				<?php 
				$limited = isset($fields['operator']['limited']) ? $fields['operator']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Operator" class=" control-label col-md-4 text-left"> Operator <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='operator' id='operator' value='{{ $row['operator'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?>
				<?php 
				$limited = isset($fields['create_date']['limited']) ? $fields['create_date']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Create Date" class=" control-label col-md-4 text-left"> Create Date <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='create_date' id='create_date' value='{{ $row['create_date'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?></fieldset>
			</div>
			
			
	
		</div>

		<input type="hidden" name="action_task" value="save" />
		
		</div>
	</div>		
	{!! Form::close() !!}
		 
   <script type="text/javascript">
	$(document).ready(function() { 
		
		
		
		$("#id_account").jCombo("{!! url('sinistersdisease/comboselect?filter=sc_accounts:id:name') !!}",
		{  selected_value : '{{ $row["id_account"] }}' });
		 		 

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