
            <!-- TOP Nav Bar END -->
            <div class="container-fluid">
               <div class="row">
                  <div class="col-sm-12 col-lg-12">
                     <div class="iq-card">
                        <div class="iq-card-header d-flex justify-content-between">
                           <div class="iq-header-title">
                              <h4 class="card-title">Edit Data</h4>
                              <a href="<?php echo base_url(); ?>employee/" class="btn btn-default" style="float: right;"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back</a>&emsp;
                           </div>
                        </div>
                        <div class="iq-card-body">
                           <div class="alert alert-success Add" style="display: none;">
                                <strong>Data Successfully Updated!</strong>
                            </div>
                            <div class="alert alert-danger Adderror" style="display: none;">
                                <strong>Duplicate Entry!</strong>
                            </div>
                           <form role="form" method="post" id="addfrm">
                              <div class="row"> 
                              <div class="col-sm-12 col-lg-6">  
                                 <div class="form-group">
                                    <label for="InputText1">Name </label>
                                    <input type="text" class="form-control" name="e_name" value="<?php echo $row->e_name; ?>" id="InputText1"  placeholder="Enter Name" required>
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-6">
                                 <div class="form-group">
                                    <label for="InputEmail3">Email ID</label>
                                    <input type="email" class="form-control" name="e_email" id="InputEmail3" value="<?php echo $row->e_email; ?>" placeholder="Enter Email ID" required>
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-4">
                                 <div class="form-group">
                                    <label for="Inputphone">Mobile Number</label>
                                    <input type="tel" class="form-control" name="e_mobile" id="Inputphone" value="<?php echo $row->e_mobile; ?>" required>
                                 </div>
                              </div>
                              <?php $employee_type=$row->e_employee_type; ?>
                              <div class="col-sm-12 col-lg-4">
                              <div class="form-group">
                                 <label for="FormControlSelect1">Employee Type</label>
                                 <select class="form-control" name="e_employee_type" id="FormControlSelect1" required>
                                    <option selected="" value="" disabled="">Employee Type</option>
                                    <option value="Hotel" <?php if($employee_type == 'Hotel'){ echo 'selected'; } ?>>Hotel</option>
                                    <option value="Restaurant" <?php if($employee_type == 'Restaurant'){ echo 'selected'; } ?>>Restaurant</option>
                                    <option value="Kitchen" <?php if($employee_type == 'Kitchen'){ echo 'selected'; } ?>>Kitchen</option>
                                 </select>
                              </div>
                              </div>
                              <div class="col-sm-12 col-lg-4">
                                 <div class="form-group">
                                    <label for="Inputphone">Join Date</label>
                                    <input type="date" class="form-control" name="join_date" id="join_date" value="<?php echo $row->join_date; ?>" required>
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-6">  
                                 <div class="form-group">
                                    <label for="InputText1">Employee Code </label>
                                    <input type="text" class="form-control" name="employee_code" id="employee_code" value="<?php echo $row->employee_code; ?>" placeholder="Employee Code" required>
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-6">  
                                 <div class="form-group">
                                    <label for="InputText1">Employee Password </label>
                                    <input type="text" class="form-control" name="e_password" id="e_password" value="<?php echo base64_decode($row->e_password); ?>" placeholder="Employee Password" required>
                                    <input type="hidden" name="e_id" value="<?php echo $row->e_id; ?>">
                                 </div>
                              </div>

                              <div class="col-sm-12 col-lg-12">
                              <div class="form-group">
                                 <label for="FormControlTextarea1">Address</label>
                                 <textarea name="e_address" class="form-control" id="FormControlTextarea1" rows="5" placeholder="Enter Address" required><?php echo $row->e_address; ?></textarea>
                              </div>
                              </div>
                              <div class="col-sm-12 col-lg-12">
                              <button type="submit" class="btn btn-primary addbtn">Submit</button>
                              <button class="btn btn-primary addload buttonload" style="display: none;"><i class="fa fa-spinner fa-spin" style=" margin-left: -12px; margin-right: 8px;"></i>Please Wait</button>
                              <button type="reset" class="btn iq-bg-danger">cancel</button>
                           </div>

                              </div>
                           </form>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
            
           
<script>
// just for the demos, avoids form submit
jQuery.validator.setDefaults({
success: "valid"
});
$("#addfrm").validate({
rules: {
project_name: {
required: true
}
}
});
</script>
<script>
$(document).ready(function(e) {
$("#addfrm").on('submit', function(e) {
e.preventDefault();
var formStatus = $('#addfrm').validate().form();
if (true == formStatus) {
$.ajax({
type: 'POST',
url: '<?php echo base_url(); ?>employee/Edit_data',
data: new FormData(this),
contentType: false,
cache: false,
processData: false,
beforeSend: function() {
$('.addbtn').hide();
$('.addload').show();
},
success: function(msg) {
if(msg=='Success')
{
$(".Add").show();
$('.Add').delay(3000).hide(200);
$('.addbtn').show();
$('.addload').hide();
setInterval(function() {
location.reload();
}, 3000);
}
else
{
$(".Adderror").show();
$('.Adderror').delay(3000).hide(200);
$('.addbtn').show();
$('.addload').hide();

}
}
});
}
});
});
</script>