@extends('layouts.app')

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

	{!! Form::open(array('url'=>'rsinisters?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> Dossiers RD</legend>
									
									  <div class="form-group row  " >
										<label for="Id" class=" control-label col-md-4 text-left"> Id <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='id' id='id' value='{{ $row['id'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <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="Coassurrance" class=" control-label col-md-4 text-left"> Coassurrance <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='coass' id='coass' value='{{ $row['coass'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Réf cabinet" class=" control-label col-md-4 text-left"> Réf cabinet <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='id_cbt' id='id_cbt' value='{{ $row['id_cbt'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Réf Cie" class=" control-label col-md-4 text-left"> Réf Cie <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='id_cie' id='id_cie' value='{{ $row['id_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="Assuré" class=" control-label col-md-4 text-left"> Assuré <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='insured' id='insured' value='{{ $row['insured'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date sinistre" class=" control-label col-md-4 text-left"> Date sinistre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='sinister_date' id='sinister_date' value='{{ $row['sinister_date'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date déclaration" class=" control-label col-md-4 text-left"> Date déclaration <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='declaration_date' id='declaration_date' value='{{ $row['declaration_date'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Nature" class=" control-label col-md-4 text-left"> Nature <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='sinister_nature' id='sinister_nature' value='{{ $row['sinister_nature'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Expert Cie" class=" control-label col-md-4 text-left"> Expert Cie <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='expert_cie' id='expert_cie' value='{{ $row['expert_cie'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Expert Assuré" class=" control-label col-md-4 text-left"> Expert Assuré <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='expert_insured' id='expert_insured' value='{{ $row['expert_insured'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date quittance" class=" control-label col-md-4 text-left"> Date quittance <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='receipt_date' id='receipt_date' value='{{ $row['receipt_date'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Montant réglement" class=" control-label col-md-4 text-left"> Montant réglement <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='receipt_amount' id='receipt_amount' value='{{ $row['receipt_amount'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date réglement" class=" control-label col-md-4 text-left"> Date réglement <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='pay_cust_date' id='pay_cust_date' value='{{ $row['pay_cust_date'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Réf réglement" class=" control-label col-md-4 text-left"> Réf réglement <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='pay_id_cbt' id='pay_id_cbt' value='{{ $row['pay_id_cbt'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Lieu sinistre" class=" control-label col-md-4 text-left"> Lieu sinistre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='sinister_place' id='sinister_place' value='{{ $row['sinister_place'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Total devis" class=" control-label col-md-4 text-left"> Total devis <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='quote_amount' id='quote_amount' value='{{ $row['quote_amount'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Total facture" class=" control-label col-md-4 text-left"> Total facture <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='invoice_amount' id='invoice_amount' value='{{ $row['invoice_amount'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Observations" class=" control-label col-md-4 text-left"> Observations <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <textarea name='observations' rows='5' id='observations' class='form-control form-control-sm '  
				           >{{ $row['observations'] }}</textarea> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Sort sinistre" class=" control-label col-md-4 text-left"> Sort sinistre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='fate_sinister' id='fate_sinister' value='{{ $row['fate_sinister'] }}' 
						     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("rsinisters/removefiles?file=")}}'+$(this).attr('url');
			$(this).parent().remove();
			$.get(removeUrl,function(response){});
			$(this).parent('div').empty();	
			return false;
		});		
		
	});
	</script>		 
@stop