<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>



<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="<?php echo site_url(); ?>assets/admin_css/css/jquery.datetimepicker.css" />
<!-- <link href="css/for_mobile.css" rel="stylesheet" /> -->


<link href="<?php echo base_url(); ?>assets/admin_css/css/bootstrap.min.css" rel="stylesheet" />
<link href="font-awesome-4.4.0/css/font-awesome.min.css"
	rel="stylesheet" />
<link href="<?php echo base_url(); ?>assets/admin_css/css/jquery.dataTables.css" rel="stylesheet"/>
<link href="<?php echo base_url(); ?>assets/admin_css/css/jquery.dataTables.min.css" rel="stylesheet"/>
<link href="<?php echo base_url(); ?>assets/admin_css/css/buttons.dataTables.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript"
	src="<?php echo base_url(); ?>assets/admin_js/js/jquery.dataTables.min.js"></script>
<script type="text/javascript"
	src="<?php echo base_url(); ?>assets/admin_js/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/admin_js/js/buttons.print.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/admin_js/js/buttons.colVis.min.js"></script>
<script src="<?php echo base_url(); ?>assets/admin_js/js/bootstrap.min.js"></script>





</head>
<body>




	<h3 style="text-align: center;">Edit Consignor</h3>


	<div id="abcd"></div>


	<div class="col-md-12">
		<div class="col-md-2 "></div>

		<div class="col-md-8" style="padding: 0px;">




			<div class="right_side">

                                    <?php foreach ($single_data as $dto): ?>

					<?php echo form_open_multipart('/ConsignorControllers/updateInfoById') ?>


					<div class="col-md-12" style="padding: 0px;">
						<div class="col-md-2"></div>
						<div class="col-md-3">
							<label> Name</label>
						</div>
						<div class="col-md-6">
							<input type="text" name="NAME" id="NAME" class="form-control"
								placeholder="Enter Name " value="<?php echo $dto->NAME; ?>"></input>

								<input
								type="hidden" name="id" id="id"   value="<?php echo $dto->id; ?>"

						</div>
					</div>

					<div class="col-md-12" style="padding: 0px;">
						<div class="col-md-2"></div>
						<div class="col-md-3">
							<label> Mobile</label>
						</div>
						<div class="col-md-6">
							<input type="text" name="mobile_no" id="mobile_no" class="form-control"
								placeholder="Enter Mobile " value="<?php echo $dto->mobile_no; ?>"></input>

						</div>
					</div>

					<div class="col-md-12" style="padding: 0px;">
						<div class="col-md-2"></div>
						<div class="col-md-3">
							<label> Address</label>
						</div>
						<div class="col-md-6">
							<input type="text" name="address" id="address" class="form-control"
								placeholder="Enter Name " value="<?php echo $dto->address; ?>"></input>

						</div>
					</div>

					<div class="col-md-12" style="padding: 0px;">
						<div class="col-md-2"></div>
						<div class="col-md-3">
							<label> Gst No</label>
						</div>
						<div class="col-md-6">
							<input type="text" name="gst_no" id="gst_no" class="form-control"
								placeholder="Enter Gst No " value="<?php echo $dto->gst_no; ?>"></input>

						</div>
					</div>


				



					<div class="col-md-12" style="padding: 0px;">
						<div class="col-md-2"></div>
						<div class="col-md-3">
							<label>Status </label>
						</div>
						<div class="col-md-6">
							<select name="STATUS" id="STATUS"
								class="form-control">


						 <option value="active" <?php if( $dto->STATUS =='active'){ echo 'selected';} ?>>active</option>
							<option value="block" <?php if( $dto->STATUS =='block'){ echo 'selected';} ?>>block</option>
							</select>



						</div>
					</div>



					</div>

						<div id="imgContainer"></div>
						<br></br>
					</div>





					<div class="col-md-12" style="padding: 0px; margin-bottom: 20px;">
					</br>
						<div class="col-md-5">&nbsp;</div>
						<div class="col-md-7">
							<input type="submit" name="submit" id="submit" value="Submit"
								class="submit">
						</div>

					</div>


  <?php echo form_close() ?>

  	<?php endforeach; ?>
			</div>
		</div>
	</div>

	<script>




	$(document).ready(function(){
	$('#stateIdfk').change(function(){
	var base_url='http://localhost/Aapatkaal_Php/index.php/';

	var country_id = $('#stateIdfk').val();


	if(country_id != '')
	{
	 $.ajax({
		 url: "<?php echo base_url(); ?>" + "index.php/LoktantraSenaniControllers/fetch_city",
		method:"POST",
		data:{country_id:country_id},
		success:function(data)
		{
		 $('#district_id_fk').html(data);

		}
	 });
	}
	else
	{

	 $('#district_id_fk').html('<option value="">Select City</option>');
	}
	});


	});
	</script>
