+
+
+
+
+
+ Edit Employee
+
+ Back
+
+
+
-
-
-
-
-
- Edit Employee
-
- Back
-
-
-
+
+
+ 0) { ?>
+
+
+ $value) { ?>
-
-
-
- 0) {
- foreach ($emp_data as $key => $value) { ?>
+
+ -
-
- Previous +
- Previous @@ -952,7 +1033,7 @@ if (!empty($EmpDetails)) { if (input.files && input.files[0]) { var reader = new FileReader(); - reader.onload = function(e) { + reader.onload = function (e) { $('#profilepicture') .attr('src', e.target.result) .width(166) @@ -964,11 +1045,9 @@ if (!empty($EmpDetails)) { } } - $(function() { - $('#checksame').click(function() { - if ($('#checksame').prop('checked')) - - { + $(function () { + $('#checksame').click(function () { + if ($('#checksame').prop('checked')) { $('#permanentaddress').val($('#currentaddress').val()); @@ -1306,7 +1385,7 @@ if (!empty($EmpDetails)) { } - $(function() { + $(function () { var d = new Date(); var month = d.getMonth(); @@ -1368,7 +1447,7 @@ if (!empty($EmpDetails)) { } - $(document).ready(function() { + $(document).ready(function () { $("#gender").select2(); $("#bloodgroup").select2(); $("#MartialStatus").select2(); @@ -1376,7 +1455,7 @@ if (!empty($EmpDetails)) { $("#departmentname").select2(); $("#eduqualifaction").select2(); $("#work_location").select2(); - document.getElementById('aadharno').addEventListener('input', function(e) { + document.getElementById('aadharno').addEventListener('input', function (e) { e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim(); }); }); @@ -1457,7 +1536,7 @@ if (!empty($EmpDetails)) { }, type: "POST", url: "deleteEmployeeFile", - success: function(data) { + success: function (data) { if (data) { alert("File removed"); return false; @@ -1480,7 +1559,7 @@ if (!empty($EmpDetails)) { } - $("#email").change(function() { + $("#email").change(function () { var id = $('#email').val(); if (validateEmail()) { @@ -1491,7 +1570,7 @@ if (!empty($EmpDetails)) { type: "POST", url: "employeedetails/CheckEmail", - success: function(data) { + success: function (data) { if (data) { alert(data + "" + " Employee already exists in the database.Please Change the mail id"); @@ -1504,7 +1583,7 @@ if (!empty($EmpDetails)) { } }); - $('#panno').change(function() { + $('#panno').change(function () { var id = $('#panno').val(); if (id != '') { @@ -1515,7 +1594,7 @@ if (!empty($EmpDetails)) { type: "POST", url: "employeedetails/checkPAN", - success: function(data) { + success: function (data) { if (data) { alert(data + "" + " Employee already exists in the database.Please Change the Pan Card Number" @@ -1531,7 +1610,7 @@ if (!empty($EmpDetails)) { } }); - $('#aadharno').change(function() { + $('#aadharno').change(function () { var id = $('#aadharno').val(); if (id != '') { @@ -1541,7 +1620,7 @@ if (!empty($EmpDetails)) { }, type: "POST", url: "employeedetails/checkAadharNo", - success: function(data) { + success: function (data) { if (data) { alert(data + "" + " Employee already exists in the database.Please Change the Aadhar card Number" @@ -1558,7 +1637,7 @@ if (!empty($EmpDetails)) { }); - $('#bankbranchname').change(function() { + $('#bankbranchname').change(function () { var bank = $('#bankbranchname').val(); @@ -1566,7 +1645,7 @@ if (!empty($EmpDetails)) { var y = ; - $.each(y, function(idx, obj) { + $.each(y, function (idx, obj) { if (bank == obj.Bank_name) { $("#ifsccode").val(obj.IFSC); @@ -1579,8 +1658,8 @@ if (!empty($EmpDetails)) { }); - $(document).ready(function() { - $('.next').click(function(e) { + $(document).ready(function () { + $('.next').click(function (e) { e.preventDefault(); // Prevent default action var isValid = true; @@ -1589,7 +1668,7 @@ if (!empty($EmpDetails)) { var $forms = $('.tab-pane form'); // Validate all forms before proceeding - $forms.each(function(index) { + $forms.each(function (index) { var $form = $(this); if (index <= currentIndex) { // Only validate forms up to the current tab @@ -1620,12 +1699,12 @@ if (!empty($EmpDetails)) { } }); - $('.submit').click(function(e) { + $('.submit').click(function (e) { e.preventDefault(); var isValid = true; - var combinedFormData = new FormData(); + var combinedFormData = new FormData(); var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here - formIds.forEach(function(formId) { + formIds.forEach(function (formId) { var $form = $(formId); if (!$form[0].checkValidity()) { @@ -1634,13 +1713,13 @@ if (!empty($EmpDetails)) { return false; // Break the loop if any form is invalid } // Append the form data to FormData - $form.serializeArray().forEach(function(field) { + $form.serializeArray().forEach(function (field) { combinedFormData.append(field.name, field.value); }); // Handle file inputs separately - $form.find('input[type="file"]').each(function() { + $form.find('input[type="file"]').each(function () { var input = $(this); - $.each(input[0].files, function(i, file) { + $.each(input[0].files, function (i, file) { combinedFormData.append(input.attr('name'), file); }); }); @@ -1658,9 +1737,9 @@ if (!empty($EmpDetails)) { data: combinedFormData, processData: false, // Prevent jQuery from processing the data contentType: false, // Prevent jQuery from setting the content type - success: function(response) { + success: function (response) { console.log(response); - + console.log('Form submitted successfully:', response == 'true'); if (response == 'true') { window.location.href = ''; @@ -1668,7 +1747,7 @@ if (!empty($EmpDetails)) { alert('Employee details Not Update...'); } }, - error: function(error) { + error: function (error) { console.log('Form submission failed:', error); } }); @@ -1689,7 +1768,7 @@ if (!empty($EmpDetails)) { } // Handle form submission - $('#fileForm').on('submit', function(event) { + $('#fileForm').on('submit', function (event) { event.preventDefault(); // Prevent default form submission // Your form submission logic here });