<div class="body-content">
                        <div class="row">
                            <div class="col-md-7">
                                <div class="card mb-4">
                                    <div class="card-header">
                                        <div class="d-flex justify-content-between align-items-center">
                                                <h6 class="fs-17 font-weight-600 mb-0"><i class="fa fa-credit-card"></i> New Travel Application</h6>
                                        </div>
                                    </div>
                                    <div class="card-body">
                                     <?php if($this->uri->segment(3)){?>
                                     <form action="<?php echo base_url();?>admin/update_travel" method="post">
                                     	<input type="hidden" name="id" value="<?php echo $edit->id;?>" />
                                     	<div class="row">
                                        	<div class="form-group col-md-4">
                                            	<label class="text-warning">Journey Type</label>
                                                <select class="form-control journey_type"  name="journey_type" required>
                                                    <option value="">Select Journey Type</option>
                        <option value="One Way" <?php if($edit->journey_type=="One Way"){echo "selected";}?>>One Way</option>
                        <option value="Round Trip" <?php if($edit->journey_type=="Round Trip"){echo "selected";}?>>Round Trip</option>
                        <option value="Multiple City" <?php if($edit->journey_type=="Multiple City"){echo "selected";}?>>Multiple City</option>
                                                </select>
                                            </div>
                                            <div class="col-md-4 form-group">
                                            	<label>Travel Date</label>
                                                <input type="date" value="<?php echo $edit->start_date;?>" class="form-control" name="start_date" required />
                                            </div>
                                            <div class="col-md-4 form-group" id="return" style="display:none;">
                                            	<label>Return Date</label>
                                                <input type="date" value="<?php if($edit->return_date!="0000-00-00"){echo $edit->return_date;}?>" class="form-control" name="return_date" />
                                            </div>
                                        </div>
                                        <div class="row">
                                        	<div class="col-md-8 multiple_cities" style="display:none;">
                                            	<label>Add Cities Names</label>
                                                <input type="text" class="form-control" value="<?php echo $edit->cities;?>" name="cities" />
                                            </div>
                                        	<div class="col-md-4 form-group city">
                                            	<label>From City</label>
                                                <input type="text" class="form-control" value="<?php echo $edit->from_city;?>" name="from_city" required />
                                            </div>
                                            <div class="col-md-4 form-group city">
                                            	<label>To City</label>
                                                <input type="text" class="form-control" value="<?php echo $edit->to_city;?>" name="to_city" required />
                                            </div>
                                            <div class="col-md-2 form-group">
                                            	<label>Adult</label>
                                                <input type="number" class="form-control" value="<?php echo $edit->adult;?>" name="adult" required />
                                            </div>
                                            <div class="col-md-2 form-group">
                                            	<label>Children</label>
                                                <input type="number" class="form-control" value="<?php echo $edit->children;?>" name="children" required />
                                            </div>
                                        </div>	
                                        <div class="checkbox checkbox-success float-right">
                                            <input id="checkbox3" type="checkbox" value="Emergency" <?php if($edit->emergency!=""){echo "checked";}?> name="emergency">
                                            <label for="checkbox3">Emergency Travel</label>
                                        </div>
                                        <h6 class="text-success">CUSTOMER DETAILS</h6>
                                        <div class="row">
                                        <div class="form-group col-md-4">
                                            <label>First Name</label>
                                            <input type="text" value="<?php echo $edit->firstname;?>" required class="form-control" name="firstname" />
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label>Last Name</label>
                                            <input type="text" value="<?php echo $edit->lastname;?>" required class="form-control" name="lastname" />
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label>Mobile</label>
                                            <input type="text" value="<?php echo $edit->mobile;?>" required class="form-control" name="mobile" />
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label>Email</label>
                                            <input type="email" value="<?php echo $edit->email;?>" class="form-control" name="email" required />
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label><i class="fa fa-plane"></i> Specific Airlines</label>
                                            <input type="text" class="form-control" value="<?php echo $edit->spec_airline;?>" name="spec_airline" />
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="form-group col-md-6">
                                            <label>Notes</label>
                                            <textarea class="form-control" name="notes" rows="3"><?php echo $edit->notes;?></textarea>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label>Special Service Required</label>
                                            <textarea class="form-control" name="spec_service" rows="3"><?php echo $edit->spec_service;?></textarea>
                                        </div>
                                    </div>
                                    <button type="submit" class="btn btn-warning">Update</button>
                                     </form>
                                     <?php }else{?>
                                     <form action="<?php echo base_url();?>admin/add_travel" method="post">
                                     	<div class="row">
                                        	<div class="form-group col-md-4">
                                            	<label class="text-warning">Journey Type</label>
                                                <select class="form-control journey_type"  name="journey_type" required>
                                                    <option value="">Select Journey Type</option>
                                                    <option value="One Way">One Way</option>
                                                    <option value="Round Trip">Round Trip</option>
                                                    <option value="Multiple City">Multiple City</option>
                                                </select>
                                            </div>
                                            <div class="col-md-4 form-group">
                                            	<label>Travel Date</label>
                                                <input type="date" class="form-control" name="start_date" required />
                                            </div>
                                            <div class="col-md-4 form-group" id="return" style="display:none;">
                                            	<label>Return Date</label>
                                                <input type="date" class="form-control" name="return_date" />
                                            </div>
                                        </div>
                                        <div class="row">
                                        	<div class="col-md-8 multiple_cities" style="display:none;">
                                            	<label>Add Cities Names</label>
                                                <input type="text" class="form-control" name="cities" />
                                            </div>
                                        	<div class="col-md-4 form-group city">
                                            	<label>From City</label>
                                                <input type="text" class="form-control" name="from_city" required />
                                            </div>
                                            <div class="col-md-4 form-group city">
                                            	<label>To City</label>
                                                <input type="text" class="form-control" name="to_city" required />
                                            </div>
                                            <div class="col-md-2 form-group">
                                            	<label>Adult</label>
                                                <input type="number" class="form-control" name="adult" required />
                                            </div>
                                            <div class="col-md-2 form-group">
                                            	<label>Children</label>
                                                <input type="number" class="form-control" name="children" required />
                                            </div>
                                        </div>	
                                        <div class="checkbox checkbox-success float-right">
                                            <input id="checkbox3" type="checkbox" value="Emergency" name="emergency">
                                            <label for="checkbox3">Emergency Travel</label>
                                        </div>
                                        <h6 class="text-success">CUSTOMER DETAILS</h6>
                                        <div class="row">
                                        <div class="form-group col-md-4">
                                            <label>First Name</label>
                                            <input type="text" required class="form-control" name="firstname" />
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label>Last Name</label>
                                            <input type="text" required class="form-control" name="lastname" />
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label>Mobile</label>
                                            <input type="text" required class="form-control" name="mobile" />
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label>Email</label>
                                            <input type="email" class="form-control" name="email" required />
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label><i class="fa fa-plane"></i> Specific Airlines</label>
                                            <input type="text" class="form-control" name="spec_airline" />
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="form-group col-md-6">
                                            <label>Notes</label>
                                            <textarea class="form-control" name="notes" rows="3"></textarea>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label>Special Service Required</label>
                                            <textarea class="form-control" name="spec_service" rows="3"></textarea>
                                        </div>
                                    </div>
                                    <button type="submit" class="btn btn-warning">Submit</button>
                                     </form>
                                     <?php }?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div><!--/.body content-->
                </div><!--/.main content-->
                
            </div><!--/.wrapper-->
        </div>
        <script src="<?php echo base_url();?>admin_assets/dist/js/popper.min.js"></script>
        <script>
		$(document).ready(function(){
			$(".journey_type").change(function(){
				var radioValue = $(this).val();//"input[name='journey_type']:checked").val();
				//alert(radioValue);
					if(radioValue=="Round Trip"){
						$("#return").show();
					}else{
						$("#return").hide();
					}
					if(radioValue=="Multiple City"){
						$(".multiple_cities").show();
						$(".city").hide();
					}else{
						$(".multiple_cities").hide();
						$(".city").show();
					}
			});
		});
		</script>
        <script src="<?php echo base_url();?>admin_assets/plugins/bootstrap/js/bootstrap.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/metisMenu/metisMenu.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/perfect-scrollbar/dist/perfect-scrollbar.min.js"></script>
        <!-- Third Party Scripts(used by this page)-->

        <!--Page Active Scripts(used by this page)-->
        <script src="<?php echo base_url();?>admin_assets/dist/js/pages/forms-basic.active.js"></script>
        <!--Page Scripts(used by all page)-->
        <script src="<?php echo base_url();?>admin_assets/dist/js/sidebar.js"></script>
    </body>
</html>