

		 {!! Form::open(array('url'=>'sinistersat', 'class'=>'form-horizontal','files' => true , 'parsley-validate'=>'','novalidate'=>' ')) !!}

	@if(Session::has('messagetext'))
	  
		   {!! Session::get('messagetext') !!}
	   
	@endif
	<ul class="parsley-error-list">
		@foreach($errors->all() as $error)
			<li>{{ $error }}</li>
		@endforeach
	</ul>		


<div class="col-md-12">
						<fieldset><legend> sinistersat</legend>
				{!! Form::hidden('id', $row['id']) !!}					
									  <div class="form-group row  " >
										<label for="Compte" class=" control-label col-md-4 text-left"> Compte <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='account_id' rows='5' id='account_id' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Réf Finassure" class=" control-label col-md-4 text-left"> Réf Finassure <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='finassure_id' id='finassure_id' value='{{ $row['finassure_id'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php 
				$limited = isset($fields['cie_id']['limited']) ? $fields['cie_id']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Réf Compagnie" class=" control-label col-md-4 text-left"> Réf Compagnie <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='cie_id' id='cie_id' value='{{ $row['cie_id'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?>					
									  <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="Date sinitre" class=" control-label col-md-4 text-left"> Date sinitre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  
				<div class="input-group input-group-sm m-b" style="width:150px !important;">
					{!! Form::text('sinister_date', $row['sinister_date'],array('class'=>'form-control form-control-sm date')) !!}
					<div class="input-group-append">
					 	<div class="input-group-text"><i class="fa fa-calendar"></i></span></div>
					 </div>
				</div> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Victime" class=" control-label col-md-4 text-left"> Victime <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='victim' id='victim' value='{{ $row['victim'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Montant Reg Client" class=" control-label col-md-4 text-left"> Montant Reg Client <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="Taux IPP" class=" control-label col-md-4 text-left"> Taux IPP <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='ipp_rate' id='ipp_rate' value='{{ $row['ipp_rate'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Nombre jours calc" class=" control-label col-md-4 text-left"> Nombre jours calc <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='num_days' id='num_days' value='{{ $row['num_days'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date de reprise du travail" class=" control-label col-md-4 text-left"> Date de reprise du travail <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  
				<div class="input-group input-group-sm m-b" style="width:150px !important;">
					{!! Form::text('date_backtowork', $row['date_backtowork'],array('class'=>'form-control form-control-sm date')) !!}
					<div class="input-group-append">
					 	<div class="input-group-text"><i class="fa fa-calendar"></i></span></div>
					 </div>
				</div> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Suivi du dossier" class=" control-label col-md-4 text-left"> Suivi du dossier <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='note' id='note' value='{{ $row['note'] }}' 
						     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">
										  <input  type='text' name='comment' id='comment' value='{{ $row['comment'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Lieu d'affectation" class=" control-label col-md-4 text-left"> Lieu d'affectation <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='affectation' id='affectation' value='{{ $row['affectation'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php 
				$limited = isset($fields['responsible_name']['limited']) ? $fields['responsible_name']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Responsable" class=" control-label col-md-4 text-left"> Responsable <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='responsible_name' id='responsible_name' value='{{ $row['responsible_name'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?>
				<?php 
				$limited = isset($fields['responsible_phone']['limited']) ? $fields['responsible_phone']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Téléphone" class=" control-label col-md-4 text-left"> Téléphone <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='responsible_phone' id='responsible_phone' value='{{ $row['responsible_phone'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?>
				<?php 
				$limited = isset($fields['responsible_email']['limited']) ? $fields['responsible_email']['limited'] :'';
				if(SiteHelpers::filterColumn($limited )) { ?>
												
									  <div class="form-group row  " >
										<label for="Email" class=" control-label col-md-4 text-left"> Email <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='responsible_email' id='responsible_email' value='{{ $row['responsible_email'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php } ?></fieldset>
			</div>
			
			

			<div style="clear:both"></div>	
				
					
				  <div class="form-group">
					<label class="col-sm-4 text-right">&nbsp;</label>
					<div class="col-sm-8">	
					<button type="submit" name="apply" class="btn btn-default btn-sm" ><i class="fa  fa-check-circle"></i> {{ Lang::get('core.sb_apply') }}</button>
					<button type="submit" name="submit" class="btn btn-default btn-sm" ><i class="fa  fa-save "></i> {{ Lang::get('core.sb_save') }}</button>
				  </div>	  
			
		</div> 
		 <input type="hidden" name="action_task" value="public" />
		 {!! Form::close() !!}
		 
   <script type="text/javascript">
	$(document).ready(function() { 
		
		
		$("#account_id").jCombo("{!! url('sinistersat/comboselect?filter=sc_accounts:id:name') !!}",
		{  selected_value : '{{ $row["account_id"] }}' });
		 

		$('.removeCurrentFiles').on('click',function(){
			var removeUrl = $(this).attr('href');
			$.get(removeUrl,function(response){});
			$(this).parent('div').empty();	
			return false;
		});		
		
	});
	</script>		 
