1672 lines
79 KiB
PHP
Executable File
1672 lines
79 KiB
PHP
Executable File
<style>
|
||
.content {
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
.switch {
|
||
position: relative;
|
||
display: inline-block;
|
||
width: 60px;
|
||
height: 31px;
|
||
vertical-align: sub;
|
||
}
|
||
|
||
.switch input {
|
||
opacity: 0;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
|
||
.slider {
|
||
position: absolute;
|
||
cursor: pointer;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background-color: #ccc;
|
||
transition: .4s;
|
||
border-radius: 34px;
|
||
}
|
||
|
||
.slider:before {
|
||
position: absolute;
|
||
content: "";
|
||
height: 23px;
|
||
width: 23px;
|
||
border-radius: 50%;
|
||
left: 4px;
|
||
bottom: 4px;
|
||
background-color: white;
|
||
transition: .4s;
|
||
}
|
||
|
||
input:checked+.slider {
|
||
background-color: #2196F3;
|
||
}
|
||
|
||
input:checked+.slider:before {
|
||
transform: translateX(26px);
|
||
}
|
||
|
||
.label-text {
|
||
margin-left: 70px;
|
||
vertical-align: middle;
|
||
}
|
||
</style>
|
||
<?php
|
||
|
||
$EmpID = '';
|
||
$FirstName = '';
|
||
$LastName = '';
|
||
$FatherName ='';
|
||
$Gender ='';
|
||
$DateofBirth = '';
|
||
$ContactNumber ='';
|
||
$EmailId = '';
|
||
$BloodGroup ='';
|
||
$MartialStatus= '';
|
||
$DateofJoining = '';
|
||
$PreviousYearsOfExp = '';
|
||
$Designation = '';
|
||
$work_location = '';
|
||
$Departmentcode = '';
|
||
$PresentAddress ='';
|
||
$PermanentAddress = '';
|
||
$EmergencyContactName = '';
|
||
$EmergencyContactNumber = '';
|
||
$Edu_Qualification = '';
|
||
$Additional_Qualification = '';
|
||
$AadharNo = '';
|
||
$PANNo = '';
|
||
$BankAccountNo = '';
|
||
$IFSCCode ='';
|
||
$BankBranchName = '';
|
||
$BankAddress = '';
|
||
$PassportNo = '';
|
||
$Passport_Valid_till = '';
|
||
$IsActive = '';
|
||
$ProfilePic = '';
|
||
$Reference_Name = '';
|
||
$Reference_ContactNumber = '';
|
||
$Remarks = '';
|
||
$DepartmentName = '';
|
||
$DOPassport = '';
|
||
$Age = '';
|
||
$DOB = '';
|
||
$DOJ = '';
|
||
$personalEmailId='';
|
||
$DriverLicense='';
|
||
$LicenseValidtill='';
|
||
$VoterID='';
|
||
$pfno = '';
|
||
$esino = '';
|
||
$nominee ='';
|
||
$uano='';
|
||
$is_management_team=0;
|
||
$esi_applicable=0;
|
||
$pf_applicable=0;
|
||
|
||
if(!empty($EmpDetails))
|
||
{
|
||
foreach ($EmpDetails as $Emp)
|
||
{
|
||
$EmpID = $Emp->EmpID;
|
||
$FirstName = $Emp->FirstName;
|
||
$LastName = $Emp->LastName;
|
||
$FatherName = $Emp->FatherName;
|
||
$Gender = $Emp->Gender;
|
||
$DateofBirth = $Emp->DateofBirth;
|
||
$from = new DateTime($DateofBirth);
|
||
$to = new DateTime('today');
|
||
$Age = $from->diff($to)->y;
|
||
$DOB = $from ->format('d-m-Y');
|
||
$ContactNumber = $Emp->ContactNumber;
|
||
$EmailId = $Emp->EmailId;
|
||
$BloodGroup = $Emp->BloodGroup;
|
||
$MartialStatus =$Emp->MartialStatus;
|
||
$DateofJoining = $Emp->DateofJoining;
|
||
$dtDOJ = new DateTime($DateofJoining);
|
||
$DOJ = $dtDOJ ->format('d-m-Y');
|
||
$PreviousYearsOfExp = $Emp->PreviousYearsOfExp;
|
||
$Designation = $Emp->Designation;
|
||
$work_location = $Emp->work_location;
|
||
$Departmentcode = $Emp->Departmentcode;
|
||
$DepartmentName = $Emp->DepartmentName;
|
||
$PresentAddress = $Emp->PresentAddress;
|
||
$PermanentAddress = $Emp->PermanentAddress;
|
||
$EmergencyContactName = $Emp->EmergencyContactName;
|
||
$EmergencyContactNumber = $Emp->EmergencyContactNumber;
|
||
$Edu_Qualification = $Emp->Edu_Qualification;
|
||
$Additional_Qualification = $Emp->Additional_Qualification;
|
||
$AadharNo = $Emp->AadharNo;
|
||
$PANNo = $Emp->PANNo;
|
||
$BankAccountNo = $Emp->BankAccountNo;
|
||
$IFSCCode = $Emp->IFSCCode;
|
||
$BankBranchName = $Emp->BankBranchName;
|
||
$BankAddress = $Emp->BankAddress;
|
||
$PassportNo = $Emp->PassportNo;
|
||
$Passport_Valid_till = $Emp->Passport_Valid_till;
|
||
if($Passport_Valid_till != '' && $Passport_Valid_till != '0000-00-00 00:00:00')
|
||
{
|
||
$dtpassport = new DateTime($Passport_Valid_till);
|
||
$DOPassport = $dtpassport ->format('d-m-Y');
|
||
}
|
||
else {
|
||
|
||
$DOPassport = '';
|
||
}
|
||
|
||
$isactive = $Emp->IsActive;
|
||
$ProfilePic = $Emp->ProfilePic;
|
||
$Reference_Name = $Emp->Reference_Name;
|
||
$Reference_ContactNumber = $Emp->Reference_ContactNumber;
|
||
$Remarks = $Emp->Remarks;
|
||
$personalEmailId = $Emp->personalEmailId;
|
||
$DriverLicense = $Emp->DriverLicense;
|
||
$VoterID = $Emp->VoterID;
|
||
$pfno = $Emp->PFNO;
|
||
$esino = $Emp->ESI;
|
||
$nominee=$Emp->NomineeDetails;
|
||
|
||
|
||
if($Emp->LicenseValidtill != '' && $Emp->LicenseValidtill != '0000-00-00 00:00:00')
|
||
{
|
||
$License = new DateTime($Emp->LicenseValidtill);
|
||
$LicenseValidtill = $License ->format('d-m-Y');
|
||
}
|
||
else
|
||
{
|
||
$LicenseValidtill = '';
|
||
}
|
||
//$chk = $uf->IsActive;
|
||
if($isactive == 1)
|
||
{
|
||
$IsActive = 'checked';
|
||
}
|
||
else
|
||
{
|
||
$IsActive = '';
|
||
}
|
||
|
||
$is_management_team = $Emp->is_management_team;
|
||
$esi_applicable = $Emp->esi_applicable;
|
||
$pf_applicable = $Emp->pf_applicable;
|
||
}
|
||
}
|
||
|
||
|
||
?>
|
||
|
||
<script>
|
||
function readURL(input) {
|
||
if (input.files && input.files[0]) {
|
||
var reader = new FileReader();
|
||
|
||
reader.onload = function(e) {
|
||
$('#profilepicture')
|
||
.attr('src', e.target.result)
|
||
.width(166)
|
||
.height(166);
|
||
};
|
||
|
||
reader.readAsDataURL(input.files[0]);
|
||
$('#ModifyImage').val(input.files[0]['name']);
|
||
}
|
||
}
|
||
|
||
$(function() {
|
||
$('#checksame').click(function() {
|
||
if ($('#checksame').prop('checked'))
|
||
|
||
{
|
||
|
||
$('#permanentaddress').val($('#currentaddress').val());
|
||
|
||
} else {
|
||
$('#permanentaddress').val('');
|
||
}
|
||
|
||
});
|
||
});
|
||
|
||
|
||
|
||
function isNumberKey(evt) {
|
||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||
if (charCode != 46 && charCode != 32 && charCode >= 33 &&
|
||
(charCode < 48 || charCode > 57))
|
||
return false;
|
||
|
||
return true;
|
||
}
|
||
|
||
function alpha(e) {
|
||
var k;
|
||
document.all ? k = e.keyCode : k = e.which;
|
||
return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 32 || (k >= 48 && k <= 57));
|
||
}
|
||
|
||
//PAN Validate
|
||
//PAN Validate
|
||
function validatePAN() {
|
||
//var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/;
|
||
var regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/;
|
||
|
||
var PAN = $('#panno').val();
|
||
|
||
if (PAN != '') {
|
||
if (regpan.test(PAN) == false) {
|
||
alert('Please Enter Valid PAN Number');
|
||
return (false);
|
||
} else {
|
||
return true;
|
||
}
|
||
} else {
|
||
alert('Please Enter PAN Number');
|
||
return (false);
|
||
}
|
||
|
||
}
|
||
|
||
|
||
|
||
function ValidateAadhar() {
|
||
//alert('validation entered');
|
||
var reg = /^\d{4}\s\d{4}\s\d{4}$/
|
||
var aadhar = $('#aadharno').val();
|
||
var aadhar_count = $('#aadharno').val().length;
|
||
|
||
if (aadhar != '') // && aadhar_count != '')
|
||
{
|
||
//alert('this is aadhar :'+aadhar);
|
||
// if(aadhar_count < 14)
|
||
// {
|
||
// //alert(aadhar1);
|
||
// alert('Aadhar card should be in 12 digits');
|
||
// }
|
||
// else
|
||
if (reg.test(aadhar) == false) {
|
||
//alert('alskdjsakjf');
|
||
alert('Please Enter Valid Aadhar Number');
|
||
return (false);
|
||
} else {
|
||
//alert('value inserted into database');
|
||
return true;
|
||
}
|
||
}
|
||
//else
|
||
//{
|
||
//alert('aadhar is blank');
|
||
//alert('please Enter Aadhar number');
|
||
|
||
//}
|
||
}
|
||
|
||
|
||
|
||
function validateDriverLicense() {
|
||
|
||
|
||
var reg = /^[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}$/;
|
||
// alert();
|
||
var VehicleNo = $('#Driverlicense').val();
|
||
if (VehicleNo != "") {
|
||
if (reg.test(VehicleNo) == false) {
|
||
alert('Please Enter Valid Driver License Number');
|
||
return (false);
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
function Validate() {
|
||
if ($("#FirstName").val().length < 1) {
|
||
alert('Please Enter FirstName');
|
||
return;
|
||
}
|
||
if ($("#LastName").val().length < 1) {
|
||
alert('Please Enter LastName');
|
||
return;
|
||
}
|
||
if ($("#FatherName").val().length < 1) {
|
||
alert('Please Enter FatherName');
|
||
return;
|
||
}
|
||
if ($("#DateofBirth").val().length < 1) {
|
||
alert('Please Enter Date of Birth');
|
||
return;
|
||
}
|
||
if ($('#ContactNumber').val().length < 1) {
|
||
alert('Please Enter Contact Number');
|
||
return;
|
||
} else if (!getMobileValidation()) {
|
||
return;
|
||
}
|
||
|
||
|
||
// if($("#email").val().length < 1)
|
||
// {
|
||
// alert('Please Enter Personal Email ID');
|
||
// return false;
|
||
// }
|
||
// else if(!validateEmail())
|
||
// {
|
||
// return;
|
||
// }
|
||
// if($("#mail").val().length < 1)
|
||
// {
|
||
// alert('Please Enter Company Email ID');
|
||
// return false;
|
||
// }
|
||
// else if(!validatecomEmail())
|
||
// {
|
||
// return;
|
||
// }
|
||
|
||
|
||
if ($("option:selected", $("#gender")).val() == '-1') {
|
||
alert('Please Select Gender');
|
||
$('#gender').focus();
|
||
return;
|
||
}
|
||
|
||
if ($("option:selected", $("#MartialStatus")).val() == "-1") {
|
||
alert('Please Select Martial Status');
|
||
$('#MartialStatus').focus();
|
||
return;
|
||
}
|
||
|
||
if ($("option:selected", $("#bloodgroup")).val() == "-1") {
|
||
alert('Please Select Blood group ');
|
||
$("#bloodgroup").focus();
|
||
return;
|
||
}
|
||
if ($("#currentaddress").val().length < 1) {
|
||
alert('Please Enter Current Address');
|
||
return;
|
||
}
|
||
if ($("#permanentaddress").val().length < 1) {
|
||
alert('Please Enter Permanent Address');
|
||
return;
|
||
}
|
||
if ($("#emergencycontactname").val().length < 1) {
|
||
alert('Please Enter Emergency Contact Name');
|
||
return;
|
||
}
|
||
if ($("#emergencycontactnumber").val().length < 1) {
|
||
alert('Please Enter Emergency Contact Number');
|
||
return;
|
||
} else if (!getValidEmergencyNumber()) {
|
||
return;
|
||
}
|
||
|
||
|
||
if ($("#referrercontno").val().length > 0) {
|
||
getValidReferNumber();
|
||
}
|
||
|
||
if ($("#passportno").val().length > 1) {
|
||
ValidatePassport();
|
||
|
||
}
|
||
|
||
}
|
||
|
||
function getMobileValidation() {
|
||
var contactNumber = $('#ContactNumber').val().length;
|
||
if (contactNumber < 10) {
|
||
alert('Please Enter valid Contact Number');
|
||
return false;
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
function getValidEmergencyNumber() {
|
||
var contactNumber = $('#emergencycontactnumber').val().length;
|
||
if (contactNumber < 10) {
|
||
alert('Please Enter valid Emergency Contact Number');
|
||
return false;
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
function getValidReferNumber() {
|
||
var contactNumber = $('#referrercontno').val().length;
|
||
if (contactNumber > 0 && contactNumber < 10) {
|
||
alert('Please Enter valid Refernce Contact Number');
|
||
return false;
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
function validateEmail() {
|
||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||
|
||
var email = $('#email').val();
|
||
|
||
if (email != '') {
|
||
if (reg.test(email) == false) {
|
||
alert('Please Enter Valid Email Address');
|
||
return (false);
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
function validatecomEmail() {
|
||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||
|
||
var email = $('#mail').val();
|
||
|
||
if (email != '') {
|
||
if (reg.test(email) == false) {
|
||
alert('Please Enter Valid Company Email Address');
|
||
return (false);
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
function validateESI() {
|
||
var reg = /(?=.*[0-9]).{10,}$/;
|
||
|
||
var ESI = $('#esino').val();
|
||
|
||
if (ESI != '') {
|
||
if (reg.test(ESI) == false) {
|
||
alert('Please Enter Valid ESI Number');
|
||
return (false);
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
function validatePF() {
|
||
var regpf = /^\d{12}$/;
|
||
|
||
var PF = $('#pfno').val();
|
||
|
||
if (PF != '') {
|
||
if (regpf.test(PF) == false) {
|
||
alert('Please Enter Valid UAN');
|
||
return (false);
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
function validateUA() {
|
||
var reg = /(?=.*[0-9]).{12,}$/;
|
||
|
||
var UA = $('#uano').val();
|
||
|
||
if (UA != '') {
|
||
if (reg.test(UA) == false) {
|
||
alert('Please Enter Valid UA Number');
|
||
return (false);
|
||
} else {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
function getAge() {
|
||
|
||
var dateString = $("#DateofBirth").val();
|
||
|
||
var today = new Date();
|
||
|
||
var dd = today.getDate();
|
||
var mm = today.getMonth() + 1;
|
||
var yyyy = today.getFullYear();
|
||
|
||
if (dd < 10) {
|
||
dd = '0' + dd;
|
||
}
|
||
if (mm < 10) {
|
||
mm = '0' + mm;
|
||
}
|
||
|
||
var today = dd + '-' + mm + '-' + yyyy;
|
||
|
||
var ageyear = yyyy - dateString.split("-")[2];
|
||
var agemonth = mm - dateString.split("-")[1];
|
||
var agedate = dateString.split("-")[0];
|
||
|
||
if (agemonth < 0 || (agemonth == 0 && dd < agedate)) {
|
||
ageyear--;
|
||
|
||
}
|
||
|
||
$("#age").val(ageyear);
|
||
|
||
}
|
||
|
||
$(function() {
|
||
var d = new Date();
|
||
|
||
var month = d.getMonth();
|
||
var day = d.getDate();
|
||
var year = d.getFullYear();
|
||
var SIAStartYear = year - 2015;
|
||
var mindt = year - 70;
|
||
var maxdt = year - 15;
|
||
|
||
$("#DateofBirth").datepicker({
|
||
minDate: new Date(mindt, 1, 1),
|
||
maxDate: new Date(maxdt, 1, 1),
|
||
dateFormat: 'dd-mm-yy',
|
||
changeMonth: true,
|
||
changeYear: true,
|
||
yearRange: '-100:+0'
|
||
|
||
|
||
});
|
||
$("#dateofjoining").datepicker({
|
||
minDate: new Date(year - SIAStartYear, 1, 1),
|
||
maxDate: 'now',
|
||
dateFormat: 'dd-mm-yy',
|
||
changeMonth: true,
|
||
changeYear: true,
|
||
|
||
|
||
});
|
||
$("#ValidTill").datepicker({
|
||
dateFormat: 'dd-mm-yy',
|
||
minDate: 'now',
|
||
changeMonth: true,
|
||
changeYear: true,
|
||
yearRange: '-0:+100'
|
||
});
|
||
$("#LicenseExpiryDate").datepicker({
|
||
dateFormat: 'dd-mm-yy',
|
||
minDate: 'now',
|
||
changeMonth: true,
|
||
changeYear: true,
|
||
yearRange: '-0:+100'
|
||
});
|
||
|
||
});
|
||
|
||
function resetphoto() {
|
||
|
||
$("#photo").src("");
|
||
}
|
||
|
||
function ValidatePassport() {
|
||
var regsaid = /^[A-PR-WY][1-9]\d\s?\d{4}[1-9]$/ig;
|
||
var passport = $("#passportno").val();
|
||
//alert(passport);
|
||
if (regsaid.test(passport) == false) {
|
||
alert('You have entered invalid Passport.');
|
||
return;
|
||
}
|
||
|
||
}
|
||
|
||
$(document).ready(function() {
|
||
$("#gender").select2();
|
||
$("#bloodgroup").select2();
|
||
$("#MartialStatus").select2();
|
||
$("#desigination").select2();
|
||
$("#departmentname").select2();
|
||
$("#eduqualifaction").select2();
|
||
$("#work_location").select2();
|
||
document.getElementById('aadharno').addEventListener('input', function(e) {
|
||
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
|
||
});
|
||
});
|
||
|
||
function onlyAlphabets(evt) {
|
||
var charCode;
|
||
if (window.event)
|
||
charCode = window.event.keyCode; //for IE
|
||
else
|
||
charCode = evt.which; //for firefox
|
||
if (charCode == 32) //for <space> symbol
|
||
return true;
|
||
if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||
return false;
|
||
if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||
return false;
|
||
if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||
return false;
|
||
return true;
|
||
}
|
||
</script>
|
||
<style>
|
||
/* legend{
|
||
color:#00c0ef ! important;
|
||
} */
|
||
.form-group {
|
||
padding-bottom: 4%;
|
||
}
|
||
|
||
.pad {
|
||
padding-bottom: 1%;
|
||
}
|
||
|
||
.badge {
|
||
color: red;
|
||
background-color: #fff;
|
||
}
|
||
|
||
legend {
|
||
border-bottom: 1px solid #ae9797 !important;
|
||
}
|
||
|
||
.box {
|
||
border-top: 0px solid #70b673 !important;
|
||
}
|
||
</style>
|
||
|
||
<div class="content-wrapper">
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<div class="col-md-1"></div>
|
||
<div class="col-md-5">
|
||
<b>
|
||
<h3>Edit <?php echo $FirstName; ?> Profile</h3>
|
||
</b>
|
||
</div>
|
||
<div class="col-md-5" style="margin-top: 20px;margin-bottom: 10px;text-align:right;">
|
||
<a class="btn btn-cancel" href="<?php echo base_url(); ?>employeeListing"> <span
|
||
class="bold">Back</span></a>
|
||
</div>
|
||
<div class="col-md-1"></div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<section class="content">
|
||
<br />
|
||
<div class="row">
|
||
<!-- left column -->
|
||
<div class="col-md-12">
|
||
<!-- general form elements -->
|
||
|
||
<div class="box box-success">
|
||
<!-- /.box-header -->
|
||
<!-- form start -->
|
||
|
||
|
||
<form role="form" id="addemployee" action="<?php echo base_url() ?>employeedetails/UpdateEmployee"
|
||
method="post" enctype="multipart/form-data">
|
||
|
||
<div class="row">
|
||
<div class="col-md-10 col-md-offset-1">
|
||
<form class="form-horizontal" role="form">
|
||
<fieldset>
|
||
|
||
<!-- Form Name -->
|
||
<legend>Personal Information</legend>
|
||
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-3">
|
||
<div class="box-header">
|
||
<img id="profilepicture"
|
||
src="<?php echo base_url().'public/uploads/images/'.$ProfilePic ; ?>"
|
||
alt="your image" style="width: 139px;" /><br />
|
||
<input type='file' onchange="readURL(this);" id="photo"
|
||
value="<?php echo $ProfilePic ; ?>" name="photo" />
|
||
<label for="photo">Select profile picture<br /><small>(only .jpg or
|
||
.png)</small></label>
|
||
|
||
<input type="hidden" name="Image" id="Image"
|
||
value="<?php echo $ProfilePic ; ?>" class="form-control"
|
||
readonly>
|
||
<input type="hidden" name="ModifyImage" id="ModifyImage"
|
||
class="form-control" readonly>
|
||
<input type="text" name="employeeid" id="employeeid"
|
||
value="<?php echo $EmpID ; ?>" placeholder="Employee ID"
|
||
class="form-control" readonly>
|
||
|
||
<input type="checkbox" id="isactive" <?php echo $IsActive;?>
|
||
name="isactive" value="1"> IS ACTIVE
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-9">
|
||
<div class="col-md-12">
|
||
<div class="col-md-6 pad">
|
||
<span>Full Name</span><span class="badge">*</span>
|
||
<input type="text" name="FirstName" maxlength="100"
|
||
value="<?php echo $FirstName ; ?>" id="FirstName"
|
||
placeholder="First Name" class="form-control" required
|
||
onkeypress="return onlyAlphabets(event);">
|
||
</div>
|
||
<div class="col-md-6 pad"><span>Father / Husband Name</span><span
|
||
class="badge">*</span>
|
||
<input type="text" name="FatherName" id="FatherName"
|
||
maxlength="200" value="<?php echo $FatherName ; ?>"
|
||
placeholder="Father / Husband Name" class="form-control"
|
||
required onkeypress="return onlyAlphabets(event);">
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="col-md-12">
|
||
|
||
<div class="col-md-6 pad"><span>Date Of Birth</span><span
|
||
class="badge">*</span>
|
||
<input id="DateofBirth" required name="DateofBirth"
|
||
value="<?php echo $DOB ; ?>" maxlength="10"
|
||
placeholder="Date Of Birth" onchange="getAge();"
|
||
class="form-control">
|
||
</div>
|
||
<div class="col-md-6 pad"><span>Age</span><span
|
||
class="badge">*</span>
|
||
<input type="text" name="age" placeholder="Age" id="age"
|
||
value="<?php echo $Age ; ?>" class="form-control" readonly>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="col-md-12">
|
||
|
||
<div class="col-md-6 pad"><span>Contact Number</span><span
|
||
class="badge">*</span>
|
||
<input type="text" name="ContactNumber"
|
||
value="<?php echo $ContactNumber ; ?>"
|
||
onchange="getMobileValidation();" id="ContactNumber"
|
||
required placeholder="Contact Number" maxlength="10"
|
||
class="form-control" onkeypress="return isNumberKey(event)">
|
||
</div>
|
||
<div class="col-md-6 pad"><span>Gender</span><span
|
||
class="badge">*</span>
|
||
<select id="gender" name="gender" type="text"
|
||
placeholder="Gender" required class="form-control select2">
|
||
<option value="<?php echo $Gender ; ?>">
|
||
<?php echo $Gender; ?></option>
|
||
<?php foreach ($GenderList as $rl): ?>
|
||
<?php $rl1 = $rl->ConfigValue; ?>
|
||
<?php if (trim($rl1) != trim($Gender)): ?>
|
||
<?php if (isset($_POST['gender']) && $_POST['gender'] == $rl1): ?>
|
||
<option value="<?= esc($rl1) ?>" selected="selected">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php else: ?>
|
||
<option value="<?= esc($rl1) ?>">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
|
||
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-12">
|
||
<div class="col-md-6 pad">
|
||
<span>Personal Email ID</span>
|
||
<input type="mail" name="emailid"
|
||
value="<?php echo $EmailId ; ?>" id="email"
|
||
placeholder="Email ID" maxlength="100" class="form-control">
|
||
</div>
|
||
<div class="col-md-6 pad">
|
||
<span>Official Email ID</span>
|
||
<input type="email" name="comemailid" id="mail"
|
||
placeholder="Official Email ID"
|
||
value="<?php echo $personalEmailId;?>" maxlength="100"
|
||
class="form-control">
|
||
</div>
|
||
|
||
</div>
|
||
<div class="col-md-12">
|
||
|
||
|
||
|
||
|
||
<div class="col-md-12 pad" style="padding: 10px 0px;">
|
||
<div class="col-md-6">
|
||
<span>Blood group</span><span class="badge">*</span>
|
||
<select id="bloodgroup" name="bloodgroup" required
|
||
class="form-control select2">
|
||
<option value="<?php echo $BloodGroup ; ?>">
|
||
<?php echo $BloodGroup ?></option>
|
||
<?php foreach ($BloodGroupList as $rl): ?>
|
||
<?php $rl1 = $rl->ConfigValue; ?>
|
||
<?php if (trim($rl1) != trim($BloodGroup)): ?>
|
||
<?php if (isset($_POST['BloodGroup']) && $_POST['BloodGroup'] == $rl1): ?>
|
||
<option value="<?= esc($rl1) ?>" selected="selected">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php else: ?>
|
||
<option value="<?= esc($rl1) ?>">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
|
||
</select>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<span>Marital Status</span><span class="badge">*</span>
|
||
<select id="MartialStatus" name="MartialStatus" type="text"
|
||
required placeholder="Marital status"
|
||
class="form-control select2">
|
||
<option value="<?php echo $MartialStatus?>">
|
||
<?php echo $MartialStatus; ?></option>
|
||
<?php foreach ($MartialList as $rl): ?>
|
||
<?php $rl1 = $rl->ConfigValue; ?>
|
||
<?php if (trim($rl1) != trim($MartialStatus)): ?>
|
||
<?php if (isset($_POST['MartialStatus']) && $_POST['MartialStatus'] == $rl1): ?>
|
||
<option value="<?= esc($rl1) ?>" selected="selected">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php else: ?>
|
||
<option value="<?= esc($rl1) ?>">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<!-- Address Section -->
|
||
<!-- Form Name -->
|
||
<legend>Address Details</legend>
|
||
<!-- Text input-->
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-12">
|
||
<span>Current Address</span><span
|
||
class="badge">*</span>
|
||
<input type="text" id="currentaddress" pattern=".{1,500}"
|
||
required name="currentaddress" maxlength="500"
|
||
value="<?php echo $PresentAddress ; ?>"
|
||
placeholder="Current Address" class="form-control">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-10">
|
||
<input type="checkbox" id="checksame" name="sameaddress"
|
||
onclick="CheckClick"> Current address same as permanent
|
||
address
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Text input-->
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-12">
|
||
<span>Permanent Address</span><span
|
||
class="badge">*</span>
|
||
<input type="text" id="permanentaddress" required
|
||
name="permanentaddress" pattern=".{0,500}"
|
||
value="<?php echo $PermanentAddress; ?>" maxlength="500"
|
||
placeholder="Permanent Address " class="form-control">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Text input-->
|
||
|
||
|
||
|
||
<!-- Emergency Contact Section -->
|
||
<!-- Form Name -->
|
||
|
||
<!-- Text input-->
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-6">
|
||
<span>Emergency Contact Name</span>
|
||
<input type="text" id="emergencycontactname" maxlength="100"
|
||
name="emergencycontactname"
|
||
value="<?php echo $EmergencyContactName ; ?>"
|
||
placeholder="Emergency Contact Name" class="form-control">
|
||
</div>
|
||
<div class="col-md-6">
|
||
<span>Emergency Contact Number</span>
|
||
<input type="text" id="emergencycontactnumber"
|
||
name="emergencycontactnumber"
|
||
onchange="getValidEmergencyNumber();" maxlength="10"
|
||
value="<?php echo $EmergencyContactNumber; ?>"
|
||
placeholder="Emergency Contact Number" class="form-control"
|
||
onkeypress="return isNumberKey(event)">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<!-- profile Section -->
|
||
<!-- Form Name -->
|
||
<legend>Work Profile</legend>
|
||
<!-- Text input-->
|
||
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-3">
|
||
<span>Designation</span><span
|
||
class="badge">*</span>
|
||
<select type="text" id="desigination" name="desigination"
|
||
required class="form-control select2">
|
||
<option value="<?php echo $Designation ; ?>">
|
||
<?php echo $Designation; ?></option>
|
||
<?php foreach ($DesignationList as $rl): ?>
|
||
<?php $rl1 = $rl->ConfigValue; ?>
|
||
<?php if (trim($rl1) != trim($Designation)): ?>
|
||
<?php if (isset($_POST['Designation']) && $_POST['Designation'] == $rl1): ?>
|
||
<option value="<?= esc($rl1) ?>" selected="selected">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php else: ?>
|
||
<option value="<?= esc($rl1) ?>">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
<div class="col-md-3">
|
||
<span>Department</span><span
|
||
class="badge">*</span>
|
||
<select type="text" id="departmentname" name="departmentname"
|
||
required class="form-control select2">
|
||
<option value="<?php echo $Departmentcode; ?>">
|
||
<?php echo $Departmentcode." - ".$DepartmentName ;?>
|
||
</option>
|
||
<?php foreach ($DepartmentList as $rl): ?>
|
||
<?php $rl1 = $rl->DEPCode; ?>
|
||
<?php if (trim($rl1) != trim($Departmentcode)): ?>
|
||
<?php if (isset($_POST['Departmentcode']) && $_POST['Departmentcode'] == $rl1): ?>
|
||
<option value="<?= esc($rl1) ?>" selected="selected">
|
||
<?= esc($rl->DEPCode)." - " .esc($rl->DepartmentName); ?>
|
||
</option>
|
||
<?php else: ?>
|
||
<option value="<?= esc($rl1) ?>">
|
||
<?= esc($rl->DEPCode)." - " .esc($rl->DepartmentName); ?>
|
||
</option>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
|
||
</div>
|
||
<div class="col-md-3">
|
||
<span>Date Of Joining</span><span
|
||
class="badge">*</span>
|
||
<input id="dateofjoining" name="dateofjoining"
|
||
value="<?php echo $DOJ; ?>" maxlength="10" required
|
||
placeholder="Date Of Joining" class="form-control">
|
||
</div>
|
||
<div class="col-md-3"><span>Previous Years of Experience</span>
|
||
<input type="text" id="Previousexperience"
|
||
value="<?php echo $PreviousYearsOfExp ; ?>"
|
||
name="Previousexperience" maxlength="4"
|
||
onkeypress="return isNumberKey(event)"
|
||
placeholder="Previous Years of Experience"
|
||
class="form-control">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-3"><span>Qualification</span><span
|
||
class="badge">*</span>
|
||
<select type="text" id="eduqualifaction" name="eduqualifaction"
|
||
required class="form-control select2">
|
||
<option value="<?php echo $Edu_Qualification; ?>">
|
||
<?php echo $Edu_Qualification ; ?></option>
|
||
<?php foreach ($QualificationList as $rl): ?>
|
||
<?php $rl1 = $rl->ConfigValue; ?>
|
||
<?php if (trim($rl1) != trim($Designation)): ?>
|
||
<?php if (isset($_POST['Edu_Qualification']) && $_POST['Edu_Qualification'] == $rl1): ?>
|
||
<option value="<?= esc($rl1) ?>" selected="selected">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php else: ?>
|
||
<option value="<?= esc($rl1) ?>">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
|
||
</div>
|
||
<div class="col-md-3" style="display:none"><span>Additional Qualification</span>
|
||
<input type="text" id="addqualification" name="addqualification"
|
||
value="<?php echo $Additional_Qualification ; ?>"
|
||
maxlength="100" placeholder="Additional Qualification"
|
||
class="form-control">
|
||
</div>
|
||
<div class="col-md-3" style="display:none"><span>Referred By</span>
|
||
<input type="text" id="referredby" name="referredby"
|
||
value="<?php echo $Reference_Name ; ?>"
|
||
placeholder="Referred By" maxlength="100"
|
||
class="form-control">
|
||
</div>
|
||
<div class="col-md-3" style="display:none">
|
||
<span>Referrer Contact Number</span>
|
||
<input type="text" id="referrercontno" name="referrercontno"
|
||
value="<?php echo $Reference_ContactNumber ; ?>"
|
||
onchange="getValidReferNumber();" maxlength="10"
|
||
placeholder="Referrer Contact Number" class="form-control"
|
||
onkeypress="return isNumberKey(event)">
|
||
</div>
|
||
<div class="col-md-3"><span>Work Location</span><span
|
||
class="badge">*</span>
|
||
<select type="text" id="work_location" name="work_location"
|
||
required class="form-control select2">
|
||
<option value="<?php echo $work_location ; ?>">
|
||
<?php echo $work_location; ?></option>
|
||
<?php foreach ($Location as $rl): ?>
|
||
<?php $rl1 = $rl->ConfigValue; ?>
|
||
<?php if (trim($rl1) != trim($work_location)): ?>
|
||
<?php if (isset($_POST['work_location']) && $_POST['work_location'] == $rl1): ?>
|
||
<option value="<?= esc($rl1) ?>" selected="selected">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php else: ?>
|
||
<option value="<?= esc($rl1) ?>">
|
||
<?= esc($rl->ConfigValue) ?></option>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span
|
||
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">Management
|
||
Team</span>
|
||
<label class="switch">
|
||
<input type="checkbox" name="is_management_team"
|
||
value=<?= $is_management_team; ?>
|
||
<?php echo $is_management_team == '1' ? 'checked' : ''; ?>
|
||
onchange="updateSwitchValue(this)" />
|
||
<span class="slider"></span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-12 pad">
|
||
|
||
|
||
</div>
|
||
|
||
<legend>Bank Details</legend>
|
||
<!-- Text input-->
|
||
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-3"><span>Bank Name</span>
|
||
<input type="text" id="bankbranchname" name="bankbranchname"
|
||
class="form-control"
|
||
value="<?php echo $BankBranchName ; ?>"
|
||
required>
|
||
|
||
</div>
|
||
<div class="col-md-3"><span>Account Number</span>
|
||
<input type="text" id="accountno" maxlength="20"
|
||
name="accountno" placeholder="Account Number"
|
||
class="form-control" value="<?php echo $BankAccountNo; ?>"
|
||
onkeypress="return isNumberKey(event)">
|
||
</div>
|
||
<div class="col-md-3"><span>IFSC Code</span>
|
||
<input type="text" id="ifsccode" name="ifsccode"
|
||
placeholder="IFSC Code" class="form-control"
|
||
value="<?php echo $IFSCCode ; ?>">
|
||
</div>
|
||
<div class="col-md-3"><span>Bank Address</span>
|
||
<input type="text" id="bankaddress" name="bankaddress"
|
||
placeholder="Bank Address" class="form-control"
|
||
value="<?php echo $BankAddress ; ?>">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<legend>Employee benefits</legend>
|
||
<!-- Text input-->
|
||
<div class="col-md-12 pad">
|
||
|
||
<div class="col-md-12">
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="Basic_Pay">Total Salary</span>
|
||
<font color="Red">*</font>
|
||
|
||
<input type="text" name="Total_salary" id="Total_salary"
|
||
value="<?php echo $empPay->TotalSalary; ?>"
|
||
pattern="([0-9]{1,8}([.][0-9]{1,2})?)"
|
||
class="form-control num"
|
||
style="text-transform:uppercase;"
|
||
title="Enter Valid Total salary Amount, Minimum Four Digit Positive Number"
|
||
onchange="calculalteHRA();" />
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="Basic_Pay">Basic Pay</span>
|
||
<font color="Red">*</font>
|
||
<input type="text" name="Basic_Pay" id="Basic_Pay"
|
||
value="<?php echo $empPay->Basic_Pay; ?>"
|
||
pattern="[0-9]{4,6}" class="form-control num"
|
||
style="text-transform:uppercase;"
|
||
title="Enter Valid Basic Pay Amount, Minimum Four Digit Positive Number"
|
||
readonly />
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="HRA_Rate">HRA Rate(%)</span>
|
||
<font color="Red">*</font>
|
||
|
||
<input type="text" name="HRA_Rate" id="HRA_Rate"
|
||
value="<?php echo $empPay->HRA_Rate; ?>" class="form-control num"
|
||
style="text-transform:uppercase;"
|
||
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
|
||
title="Enter the Valid HRA Rate, Minimum 1 digit, Maximum 2 digit"
|
||
readonly />
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="HRA_Rate">HRA Amount</span>
|
||
<font color="Red">*</font>
|
||
<input type="text" name="HRA_Amount" id="HRA_Amount"
|
||
class="form-control num"
|
||
value="<?php echo $empPay->HRA_Amount; ?>"
|
||
style="text-transform:uppercase;" readonly />
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="col-md-12">
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span
|
||
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">ESI
|
||
Applicable</span>
|
||
<label class="switch">
|
||
<input type="checkbox" name="esi_applicable"
|
||
value=<?= $esi_applicable; ?>
|
||
<?php echo $esi_applicable == '1' ? 'checked' : ''; ?>
|
||
onchange="updateSwitchValue(this)" />
|
||
<span class="slider"></span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group"><span>ESI Number</span>
|
||
<input type="text" id="esino" name="esino" maxlength="10"
|
||
onchange="validateESI();" class="form-control"
|
||
title=" 10 digit number"
|
||
value="<?php echo $esino; ?>"
|
||
onkeypress="return isNumberKey(event)">
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="ESI_Rate">ESI Rate(%)</span>
|
||
<font color="Red">*</font>
|
||
<input type="text" name="ESI_Rate"
|
||
value="<?php echo $empPay->ESI_Rate; ?>"
|
||
class="form-control num"
|
||
style="text-transform:uppercase;"
|
||
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
|
||
title="Enter the Valid ESI Rate, Minimum 1 digit, Maximum 2 digits"
|
||
readonly />
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3"></div>
|
||
</div>
|
||
|
||
<div class="col-md-12">
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span
|
||
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">PF
|
||
Applicable</span>
|
||
<label class="switch">
|
||
<input type="checkbox" name="pf_applicable"
|
||
value=<?= $pf_applicable; ?>
|
||
<?php echo $pf_applicable == '1' ? 'checked' : ''; ?>
|
||
onchange="updateSwitchValue(this)" />
|
||
<span class="slider"></span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group"><span>UAN</span>
|
||
<input type="text" id="pfno" name="pfno" maxlength="22"
|
||
value="<?php echo $pfno; ?>"
|
||
onchange="validatePF();" class="form-control"
|
||
style="text-transform:uppercase"
|
||
pattern="\d{12}"
|
||
title="12 Digit number"
|
||
onkeypress="return alpha(event);">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="PF_Rate">PF Rate(%)</span>
|
||
<font color="Red">*</font>
|
||
<input type="text" name="PF_Rate"
|
||
value="<?php echo $empPay->PF_Rate; ?>"
|
||
class="form-control num"
|
||
style="text-transform:uppercase;"
|
||
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
|
||
title="Enter the valid PF Rate, Minimum 1 digit, Maximum 2 digits"
|
||
readonly />
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3"></div>
|
||
</div>
|
||
|
||
|
||
|
||
<legend>ID Proof</legend>
|
||
<!-- Text input-->
|
||
|
||
<div class="form-group">
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-3"><span>Aadhar Number</span> <span
|
||
class="badge">*</span>
|
||
<input type="text" id="aadharno" name="aadharno" required
|
||
maxlength="14" placeholder="Aadhar Number"
|
||
onchange="ValidateAadhar();" class="form-control num"
|
||
value="<?php echo $AadharNo ; ?>"
|
||
title=" : 12 digit number">
|
||
<!-- onkeypress="return isNumberKey(event)"> -->
|
||
</div>
|
||
<div class="col-md-3"><span>PAN Number</span>
|
||
<input type="text" id="panno"
|
||
style="text-transform: uppercase" maxlength="10"
|
||
name="panno" placeholder="PAN Number"
|
||
onchange="validatePAN();" class="form-control"
|
||
value="<?php echo $PANNo ; ?>"
|
||
onkeypress="return alpha(event);"
|
||
pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}"
|
||
title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) ">
|
||
</div>
|
||
<div class="col-md-3"><span>Passport Number</span>
|
||
<input type="text" id="passportno" name="passportno"
|
||
maxlength="9" placeholder="Passport Number"
|
||
onkeypress="return alpha(event);"
|
||
onchange="ValidatePassport();" class="form-control"
|
||
value="<?php echo $PassportNo ; ?>"
|
||
pattern="[Aa-PpRr-WwYy]{1}[1-9]{1}\d{1}\s\d{4}[1-9]{1}"
|
||
title="The first digit or the last digit will never be 0
|
||
The first character cannot be Q, X or Z. (eg:A12 34567)" style="text-transform: uppercase">
|
||
</div>
|
||
|
||
<div class="col-md-3"><span>Passport Expiry Date</span>
|
||
<input id="ValidTill" name="ValidTill" maxlength="10"
|
||
placeholder="Passport Expiry Date" class="form-control"
|
||
value="<?php echo $DOPassport ; ?>">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-3"><span>Voter ID</span>
|
||
<input type="text" id="VoterID" name="VoterID"
|
||
maxlength="12" value="<?php echo $VoterID;?>"
|
||
class="form-control" placeholder="VoterID"
|
||
onkeypress="return alpha(event);"
|
||
style="text-transform: uppercase">
|
||
</div>
|
||
<div class="col-md-3"><span>Driving License</span>
|
||
<!-- <input type="text" id="Driverlicense" maxlength="16" onchange="validateDriverLicense();" pattern="[A-Z]{2}[0-9]{2}\s[0-9]{11}" value="<?php echo $DriverLicense;?>"name="Driverlicense" title="EX:TN82 12345678900" class="form-control" value=""placeholder="Driverlicense"> -->
|
||
<input type="text" id="Driverlicense" maxlength="16"
|
||
onchange="validateDriverLicense();"
|
||
pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}"
|
||
value="<?php echo $DriverLicense;?>"
|
||
name="Driverlicense" title="EX:TN82 12345678900"
|
||
class="form-control" placeholder="Driverlicense"
|
||
style="text-transform: uppercase"
|
||
onkeypress="return alpha(event);">
|
||
|
||
</div>
|
||
|
||
<div class="col-md-3"><span>Driving License Expiry Date</span>
|
||
<input id="LicenseExpiryDate" name="LicenseExpiryDate"
|
||
value="<?php echo $LicenseValidtill;?>"
|
||
onkeypress="return false;" class="form-control"
|
||
placeholder="License Expiry Date">
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<legend>Nominee Details</legend>
|
||
<!-- Text input-->
|
||
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-12"><span>Nominee reference</span>
|
||
<input type="text" id="nomineename" name="nomineename"
|
||
maxlength="250" class="form-control"
|
||
placeholder="Nominee Name" value="<?php echo $nominee ;?>">
|
||
<!-- rows="3" cols="50" -->
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<legend>Files</legend>
|
||
|
||
<div class="files">
|
||
|
||
<?php foreach ($emp_data as $key => $value) { ?>
|
||
|
||
<div class="col-md-12 pad ">
|
||
<div class="col-md-4">
|
||
<span>File Name</span>
|
||
<input type="text" maxlength="255" class="form-control"
|
||
value="<?php echo $value['file_name']; ?>" readonly>
|
||
</div>
|
||
<div class="col-md-1" style="margin-top: 25px;">
|
||
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $value['emp_file']; ?>"
|
||
download>
|
||
<i class="fa fa-download" aria-hidden="true"
|
||
style="font-size: 25px;"></i>
|
||
</a>
|
||
</div>
|
||
<div class="col-md-5" style="margin-top: 23px;">
|
||
<button type="button" class="btn btn-danger btn-sm"
|
||
id="<?= $value['id']; ?>"
|
||
onclick="removeContact(this)">Delete</button>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<?php } ?>
|
||
|
||
<div id="filesContainer"></div>
|
||
</div>
|
||
|
||
<div style="padding: 70px;"></div>
|
||
|
||
|
||
|
||
|
||
<!-- Command -->
|
||
|
||
<div class="form-group">
|
||
<div class="col-md-3 col-md-offset-9" style="padding: 10px;">
|
||
<div class="pull-right">
|
||
<a href="<?php echo base_url() ?>employeeListing"
|
||
class="btn btn-cancel" id="cancel"
|
||
value="Cancel">Cancel</a>
|
||
<input type="submit" id="submit" onclick="Validate();"
|
||
class="btn btn-success" value="Submit" />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</fieldset>
|
||
</form>
|
||
</div><!-- /.col-lg-12 -->
|
||
</div><!-- /.row -->
|
||
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<?php
|
||
helper('form');
|
||
$error = session()->getFlashdata('error');
|
||
if($error)
|
||
{
|
||
?>
|
||
<div class="alert alert-danger alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('error'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<?php
|
||
$success = session()->getFlashdata('success');
|
||
if($success)
|
||
{
|
||
?>
|
||
<div class="alert alert-success alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('success'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
</div>
|
||
|
||
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
||
<script>
|
||
|
||
function updateSwitchValue(checkbox) {
|
||
checkbox.value = checkbox.checked ? "1" : "0";
|
||
}
|
||
|
||
function calculalteHRA() {
|
||
//var empid=document.getElementById('emp').value;
|
||
//alert(empid);
|
||
var Totalsalary = document.getElementById('Total_salary').value;
|
||
var HRA = document.getElementById('HRA_Rate').value;
|
||
//if(EmpID == -1){alert("Select Employee ID..!");}
|
||
if (HRA == '') {
|
||
alert("Please Enter HRA RATE..");
|
||
document.getElementById('HRA_Rate').focus();
|
||
} else if (Totalsalary == '') {
|
||
alert("Please Enter Total Salary..");
|
||
document.getElementById('total_salary').focus();
|
||
} else {
|
||
var temp = (Totalsalary * (HRA / 100));
|
||
var basic = Totalsalary - temp;
|
||
document.getElementById('Basic_Pay').value = basic;
|
||
document.getElementById('HRA_Amount').value = temp;
|
||
}
|
||
}
|
||
function appendFilesFileds(data) {
|
||
var newRowHtml = `
|
||
<div class="col-md-12 pad">
|
||
<div class="col-md-4">
|
||
<span for="file_name">File name</span>
|
||
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control" value="${data != null && data != '' ? data.file_name : ''}">
|
||
</div>
|
||
<div class="col-md-4">
|
||
<span for="emp_file">File</span>
|
||
<input type="file" name="emp_file[]" class="form-control">
|
||
</div>
|
||
<div class="col-md-4" style="margin-top: 23px;">
|
||
<button type="button" class="btn btn-danger btn-sm" id="" onclick="removeContact(this)">Remove</button>
|
||
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
|
||
</div>
|
||
</div>`;
|
||
|
||
$('#filesContainer').append(newRowHtml);
|
||
// $('.a1').hide();
|
||
// $('#filesContainer .pad:last .a1').show();
|
||
}
|
||
|
||
function removeContact(button) {
|
||
if (button.id != '') {
|
||
$('#loader').show();
|
||
|
||
$.ajax({
|
||
data: {
|
||
id: button.id
|
||
},
|
||
type: "POST",
|
||
url: "<?php echo base_url();?>deleteEmployeeFile",
|
||
success: function(data) {
|
||
$('#loader').hide();
|
||
|
||
if (data) {
|
||
alert("File removed");
|
||
return false;
|
||
|
||
}
|
||
|
||
}
|
||
});
|
||
}
|
||
$(button).closest('.pad').remove();
|
||
$('#filesContainer .a1').hide();
|
||
$('#filesContainer .pad:last .a1').show();
|
||
var len = $('#filesContainer .pad:last .a1')
|
||
var length = len.length;
|
||
if (length == 0) {
|
||
$('#day').show()
|
||
} else {
|
||
$('#day').hide()
|
||
}
|
||
}
|
||
|
||
|
||
$("#email").change(function() {
|
||
|
||
var id = $('#email').val();
|
||
if (validateEmail()) {
|
||
$('#loader').show();
|
||
$.ajax({
|
||
data: {
|
||
id: id
|
||
},
|
||
|
||
type: "POST",
|
||
url: "<?php echo base_url();?>employeedetails/CheckEmail",
|
||
success: function(data) {
|
||
$('#loader').hide();
|
||
if (data) {
|
||
alert(data + "" +
|
||
" Employee already exists in the database.Please Change the mail id");
|
||
return false;
|
||
//window.location = 'Employeedetails/employeeListing';
|
||
}
|
||
|
||
}
|
||
});
|
||
}
|
||
|
||
});
|
||
$('#panno').change(function() {
|
||
|
||
var id = $('#panno').val();
|
||
if (id != '') {
|
||
$('#loader').show();
|
||
$.ajax({
|
||
data: {
|
||
id: id
|
||
},
|
||
|
||
type: "POST",
|
||
url: "<?php echo base_url();?>employeedetails/checkPAN",
|
||
success: function(data) {
|
||
$('#loader').hide();
|
||
if (data) {
|
||
alert(data + "" +
|
||
" Employee already exists in the database.Please Change the Pan Card Number"
|
||
);
|
||
$('#panno').val('');
|
||
$('#panno').focus();
|
||
//return false;
|
||
//window.location = 'Employeedetails/employeeListing';
|
||
}
|
||
|
||
}
|
||
});
|
||
}
|
||
|
||
});
|
||
$('#aadharno').change(function() {
|
||
|
||
var id = $('#aadharno').val();
|
||
if (id != '') {
|
||
$('#loader').show();
|
||
$.ajax({
|
||
data: {
|
||
id: id
|
||
},
|
||
type: "POST",
|
||
url: "<?php echo base_url();?>employeedetails/checkAadharNo",
|
||
success: function(data) {
|
||
$('#loader').hide();
|
||
if (data) {
|
||
alert(data + "" +
|
||
" Employee already exists in the database.Please Change the Aadhar card Number"
|
||
);
|
||
$('#aadharno').val('');
|
||
$('#aadharno').focus();
|
||
//return false;
|
||
//window.location = 'Employeedetails/employeeListing';
|
||
}
|
||
}
|
||
|
||
});
|
||
}
|
||
|
||
});
|
||
|
||
$('#bankbranchname').change(function() {
|
||
|
||
var bank = $('#bankbranchname').val();
|
||
|
||
if (bank != '-1') {
|
||
|
||
var y = <?php echo json_encode($bankdetails, JSON_PRETTY_PRINT) ?>;
|
||
|
||
$.each(y, function(idx, obj) {
|
||
|
||
if (bank == obj.Bank_name) {
|
||
$("#ifsccode").val(obj.IFSC);
|
||
$("#bankaddress").val(obj.Address);
|
||
|
||
}
|
||
});
|
||
}
|
||
|
||
});
|
||
</script>
|