

		 {!! Form::open(array('url'=>'adherents', '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> Gestion des adhérents</legend>
				{!! Form::hidden('id', $row['id']) !!}					
									  <div class="form-group row  " >
										<label for="Licence" class=" control-label col-md-4 text-left"> Licence <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='licence' id='licence' value='{{ $row['licence'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="First Name" class=" control-label col-md-4 text-left"> First Name <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='first_name' id='first_name' value='{{ $row['first_name'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Last Name" class=" control-label col-md-4 text-left"> Last Name <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='last_name' id='last_name' value='{{ $row['last_name'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Type d'identité" class=" control-label col-md-4 text-left"> Type d'identité <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_identity_type' rows='5' id='id_identity_type' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="N° identité" class=" control-label col-md-4 text-left"> N° identité <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='identity_no' id='identity_no' value='{{ $row['identity_no'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date de naissance" class=" control-label col-md-4 text-left"> Date de naissance <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('birth_date', $row['birth_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="Ligue" class=" control-label col-md-4 text-left"> Ligue <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_ligue' rows='5' id='id_ligue' class='select2 '   ></select> 
										 </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">
										  <select name='id_nature' rows='5' id='id_nature' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Sous-ligue" class=" control-label col-md-4 text-left"> Sous-ligue <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_subligue' rows='5' id='id_subligue' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Catégorie" class=" control-label col-md-4 text-left"> Catégorie <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_categorie' rows='5' id='id_categorie' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Fonction" class=" control-label col-md-4 text-left"> Fonction <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_function' rows='5' id='id_function' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date d'adhésion" class=" control-label col-md-4 text-left"> Date d'adhésion <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('adhesion_date', $row['adhesion_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="Qualification" class=" control-label col-md-4 text-left"> Qualification <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_qualification' rows='5' id='id_qualification' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date qualification" class=" control-label col-md-4 text-left"> Date qualification <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('qualification_date', $row['qualification_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="Statut" class=" control-label col-md-4 text-left"> Statut <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='id_status' rows='5' id='id_status' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Commentaire" class=" control-label col-md-4 text-left"> Commentaire <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <textarea name='comment' rows='5' id='editor' class='form-control form-control-sm editor '  
						 >{{ $row['comment'] }}</textarea> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> </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() { 
		
		
		$("#id_identity_type").jCombo("{!! url('adherents/comboselect?filter=foot_identity_type:id:name') !!}",
		{  selected_value : '{{ $row["id_identity_type"] }}' });
		
		$("#id_ligue").jCombo("{!! url('adherents/comboselect?filter=foot_ligues:id:name') !!}",
		{  selected_value : '{{ $row["id_ligue"] }}' });
		
		$("#id_nature").jCombo("{!! url('adherents/comboselect?filter=foot_nature_sous_ligues:id:name') !!}",
		{  selected_value : '{{ $row["id_nature"] }}' });
		
		$("#id_subligue").jCombo("{!! url('adherents/comboselect?filter=foot_sous_ligues:id:name') !!}&parent=id_ligue:",
		{  parent: '#id_ligue', selected_value : '{{ $row["id_subligue"] }}' });
		
		$("#id_categorie").jCombo("{!! url('adherents/comboselect?filter=foot_categories:id:name') !!}",
		{  selected_value : '{{ $row["id_categorie"] }}' });
		
		$("#id_function").jCombo("{!! url('adherents/comboselect?filter=foot_functions:id:name') !!}",
		{  selected_value : '{{ $row["id_function"] }}' });
		
		$("#id_qualification").jCombo("{!! url('adherents/comboselect?filter=foot_qualifications:id:name') !!}",
		{  selected_value : '{{ $row["id_qualification"] }}' });
		
		$("#id_status").jCombo("{!! url('adherents/comboselect?filter=foot_status:id:name') !!}",
		{  selected_value : '{{ $row["id_status"] }}' });
		 

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