<?php //for($i=1;$i<=6;$i++){
	//if($step->step1_status!=""){?>
 
<div class="form-group" style="margin:20px;">
	<label>Application No.</label>
    <input type="text" value="<?php echo $step->appno;?>" class="form-control" id="appno" />
</div>
<div class="checkbox checkbox-primary">
    <input id="step1_status" class="steps_form" value="Data Collected" name="step1_status" <?php if($step->step1_status!=""){ echo 'disabled checked';}?>  type="checkbox">
    <label for="step1_status">Data Collected</label>
</div><br/>
<div class="checkbox checkbox-primary">
    <input id="step2_status"  class="steps_form" value="Uploaded to Govt Site" name="step2_status" <?php if($step->step2_status!=""){ echo 'disabled checked';}?> type="checkbox">
    <label for="step2_status">Uploaded to Govt Site</label>
</div>
<br/>
<div class="checkbox checkbox-primary">
    <input id="step3_status"  class="steps_form" value="Generated Application ID" name="step3_status" <?php if($step->step3_status!=""){ echo 'disabled checked';}?> type="checkbox">
    <label for="step3_status">Generated Application ID</label>
</div><br/>
<div class="checkbox checkbox-primary">
    <input id="step4_status"class="steps_form" value="Received EVISA" name="step4_status" <?php if($step->step4_status!=""){ echo 'disabled checked';}?> type="checkbox">
    <label for="step4_status">Received EVISA</label>
</div><br/>
<div class="checkbox checkbox-primary">
    <input id="step5_status"class="steps_form"  value="Informed Customer and Handed Over" name="step5_status" <?php if($step->step5_status!=""){ echo 'disabled checked';}?> type="checkbox">
    <label for="step5_status">Informed Customer and Handed Over</label>
</div>
<?php //}?>
<script>
$(document).ready(function(){
	$("#appno").keyup(function(){
		var no=$(this).val();
		$.ajax({
			 type: "POST",
			 url: '<?php echo base_url();?>admin/update_appno',
			 data: {appno:no,id:<?php echo $step->id;?>},
			 success: function(res){
			 //alert('Status Updated');
			// $(".myModalsteps_div").html(res);
			}
		 }); 
	});
	$(".steps_form").click(function(){
		var name=$(this).attr("name");
		if($(this).is(":checked")){
			var step=$(this).val(); 	
		}else{
			var step="";
		}
		$.ajax({
			 type: "POST",
			 url: '<?php echo base_url();?>admin/update_status',
			 data: {name:name,step:step,id:<?php echo $step->id;?>},
			 success: function(res){
			 alert('Status Updated');
			// $(".myModalsteps_div").html(res);
			}
		 }); 
	});
});
</script>