add and Edit employee added
This commit is contained in:
parent
c6a878d2d0
commit
0fd6001d3f
@ -21,6 +21,20 @@ $(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function blockKeyPress(evt)
|
||||||
|
{
|
||||||
|
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||||
|
alert(charCode);
|
||||||
|
if(charCode == 8 || charCode == 46 )
|
||||||
|
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function isNumberKey(evt)
|
function isNumberKey(evt)
|
||||||
{
|
{
|
||||||
@ -57,30 +71,30 @@ function Validate()
|
|||||||
if($("#FirstName").val().length < 1)
|
if($("#FirstName").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter FirstName');
|
alert('Please Enter FirstName');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#LastName").val().length < 1)
|
if($("#LastName").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter LastName');
|
alert('Please Enter LastName');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#FatherName").val().length < 1)
|
if($("#FatherName").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter FatherName');
|
alert('Please Enter FatherName');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#DateofBirth").val().length < 1)
|
if($("#DateofBirth").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter Date of Birth');
|
alert('Please Enter Date of Birth');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if ( $('#ContactNumber').val().length < 1 )
|
if ( $('#ContactNumber').val().length < 1 )
|
||||||
{
|
{
|
||||||
alert('Please Enter Contact Number');
|
alert('Please Enter Contact Number');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
else if(!getMobileValidation())
|
else if(!getMobileValidation())
|
||||||
{ return;}
|
{ return false; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -88,69 +102,69 @@ function Validate()
|
|||||||
if($("#emailid").val().length < 1)
|
if($("#emailid").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter Email ID');
|
alert('Please Enter Email ID');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
else if(!validateEmail())
|
else if(!validateEmail())
|
||||||
{
|
{
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($("option:selected", $("#gender")).val() == '-1')
|
if($("option:selected", $("#gender")).val() == '-1')
|
||||||
{
|
{
|
||||||
alert('Please Select Gender');
|
alert('Please Select Gender');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("option:selected", $("#MartialStatus")).val() == "-1")
|
if($("option:selected", $("#MartialStatus")).val() == "-1")
|
||||||
{
|
{
|
||||||
alert('Please Select Martial Status');
|
alert('Please Select Martial Status');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("option:selected", $("#bloodgroup")).val() == "-1")
|
if($("option:selected", $("#bloodgroup")).val() == "-1")
|
||||||
{
|
{
|
||||||
alert('Please Select Blood group ');
|
alert('Please Select Blood group ');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#currentaddress").val().length < 1)
|
if($("#currentaddress").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter Current Address');
|
alert('Please Enter Current Address');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#permanentaddress").val().length < 1)
|
if($("#permanentaddress").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter Permanent Address');
|
alert('Please Enter Permanent Address');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#emergencycontactname").val().length < 1)
|
if($("#emergencycontactname").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter Emergency Contact Name');
|
alert('Please Enter Emergency Contact Name');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#emergencycontactnumber").val().length < 1)
|
if($("#emergencycontactnumber").val().length < 1)
|
||||||
{
|
{
|
||||||
alert('Please Enter Emergency Contact Number');
|
alert('Please Enter Emergency Contact Number');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
else if(!getValidEmergencyNumber())
|
else if(!getValidEmergencyNumber())
|
||||||
{ return;}
|
{ return false;}
|
||||||
|
|
||||||
|
|
||||||
if($("option:selected", $("#desigination")).val() == "-1")
|
if($("option:selected", $("#desigination")).val() == "-1")
|
||||||
{
|
{
|
||||||
alert('Please Select Desigination ');
|
alert('Please Select Desigination ');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("option:selected", $("#departmentname")).val() == "-1")
|
if($("option:selected", $("#departmentname")).val() == "-1")
|
||||||
{
|
{
|
||||||
alert('Please Select Department name');
|
alert('Please Select Department name');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if($("option:selected", $("#eduqualifaction")).val() == "-1")
|
if($("option:selected", $("#eduqualifaction")).val() == "-1")
|
||||||
{
|
{
|
||||||
alert('Please Select Qualification');
|
alert('Please Select Qualification');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#referrercontno").val().length > 0)
|
if($("#referrercontno").val().length > 0)
|
||||||
@ -227,7 +241,6 @@ function getAge() {
|
|||||||
var today = new Date();
|
var today = new Date();
|
||||||
var birthDate = new Date(dateString);
|
var birthDate = new Date(dateString);
|
||||||
|
|
||||||
|
|
||||||
var age = today.getFullYear() - birthDate.getFullYear();
|
var age = today.getFullYear() - birthDate.getFullYear();
|
||||||
var m = today.getMonth() - birthDate.getMonth();
|
var m = today.getMonth() - birthDate.getMonth();
|
||||||
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
||||||
@ -282,6 +295,7 @@ function ValidatePassport()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
legend{
|
legend{
|
||||||
@ -358,12 +372,19 @@ function ValidatePassport()
|
|||||||
<input type="text" name="FatherName" id="FatherName" maxlength="200" placeholder="Father / Husband Name" class="form-control" required>
|
<input type="text" name="FatherName" id="FatherName" maxlength="200" placeholder="Father / Husband Name" class="form-control" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 pad"><span class="badge">*</span>
|
<div class="col-md-6 pad"><span class="badge">*</span>
|
||||||
<input id="DateofBirth" required name="DateofBirth" maxlength="10" placeholder="Date Of Birth" onchange="getAge();" class="form-control">
|
<input id="DateofBirth" required name="DateofBirth" onkeypress="return false;" maxlength="10" placeholder="Date Of Birth" onchange="getAge();" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6 pad">
|
<div class="col-md-6 pad">
|
||||||
<input type="text" name="age" placeholder="Age" id="age" class="form-control" readonly>
|
<input type="text" name="age" placeholder="Age" id="age" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<input type="text" name="ContactNumber" onchange="getMobileValidation();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="ContactNumber" required placeholder="Contact Number" maxlength="10" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<input type="mail" name="emailid" id="emailid" placeholder="Email ID" maxlength="100" class="form-control">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6 pad">
|
<div class="col-md-6 pad">
|
||||||
<select id="gender" name="gender" type="text" placeholder="Gender" required class="form-control">
|
<select id="gender" name="gender" type="text" placeholder="Gender" required class="form-control">
|
||||||
<option value="-1">Select Gender</option>
|
<option value="-1">Select Gender</option>
|
||||||
@ -380,14 +401,6 @@ function ValidatePassport()
|
|||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 pad"><span class="badge">*</span>
|
|
||||||
<input type="text" name="ContactNumber" onchange="getMobileValidation();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="ContactNumber" required placeholder="Contact Number" maxlength="10" class="form-control">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 pad"><span class="badge">*</span>
|
|
||||||
<input type="mail" name="emailid" id="emailid" placeholder="Email ID" maxlength="100" class="form-control">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6 pad">
|
<div class="col-md-6 pad">
|
||||||
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Martial status" class="form-control">
|
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Martial status" class="form-control">
|
||||||
@ -508,7 +521,7 @@ function ValidatePassport()
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input id="dateofjoining" name="dateofjoining" maxlength="10" required placeholder="Date Of Joining" class="form-control">
|
<input id="dateofjoining" name="dateofjoining" onkeypress="return false;" maxlength="10" required placeholder="Date Of Joining" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="text" id="Previousexperience" name="Previousexperience" maxlength="4" onkeypress="return isNumberKey(event)" placeholder="Previous Years of Experience" class="form-control">
|
<input type="text" id="Previousexperience" name="Previousexperience" maxlength="4" onkeypress="return isNumberKey(event)" placeholder="Previous Years of Experience" class="form-control">
|
||||||
@ -549,16 +562,16 @@ function ValidatePassport()
|
|||||||
<!-- Text input-->
|
<!-- Text input-->
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-3"><span class="badge">*</span>
|
<div class="col-md-3">
|
||||||
<input type="text" id="accountno" onkeypress="return event.charCode >= 48 && event.charCode <= 57" maxlength="15" name="accountno" placeholder="Account Number" class="form-control">
|
<input type="text" id="accountno" onkeypress="return event.charCode >= 48 && event.charCode <= 57" maxlength="15" name="accountno" placeholder="Account Number" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span class="badge">*</span>
|
<div class="col-md-3">
|
||||||
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code" maxlength="10" class="form-control">
|
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code" maxlength="10" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span class="badge">*</span>
|
<div class="col-md-3">
|
||||||
<input type="text" id="bankbranchname" maxlength="200" name="bankbranchname" placeholder="Bank Branch Name" class="form-control">
|
<input type="text" id="bankbranchname" maxlength="200" name="bankbranchname" placeholder="Bank Branch Name" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span class="badge">*</span>
|
<div class="col-md-3">
|
||||||
<input type="text" id="bankaddress" maxlength="200" name="bankaddress" placeholder="Bank Address" class="form-control">
|
<input type="text" id="bankaddress" maxlength="200" name="bankaddress" placeholder="Bank Address" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -577,7 +590,7 @@ function ValidatePassport()
|
|||||||
<input type="text" id="passportno" maxlength="8" onchange="ValidatePassport();" name="passportno" placeholder="Passport Number" class="form-control">
|
<input type="text" id="passportno" maxlength="8" onchange="ValidatePassport();" name="passportno" placeholder="Passport Number" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input id="ValidTill" name="ValidTill" maxlength="10" placeholder="ValidTill" class="form-control">
|
<input id="ValidTill" name="ValidTill" onkeypress="return false;" maxlength="10" placeholder="ValidTill" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -597,7 +610,7 @@ function ValidatePassport()
|
|||||||
<div class="col-md-3 col-md-offset-9">
|
<div class="col-md-3 col-md-offset-9">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<input type="reset" id="reset" onclick="resetphoto();" class="btn btn-info" value="Reset" />
|
<input type="reset" id="reset" onclick="resetphoto();" class="btn btn-info" value="Reset" />
|
||||||
<input type="submit" onclick="Validate();" class="btn btn-primary"></button>
|
<input type="submit" onclick="validate();" id="submit" class="btn btn-primary">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
738
application/views/editEmployee.php
Normal file
738
application/views/editEmployee.php
Normal file
@ -0,0 +1,738 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$EmpID = '';
|
||||||
|
$FirstName = '';
|
||||||
|
$LastName = '';
|
||||||
|
$FatherName ='';
|
||||||
|
$Gender ='';
|
||||||
|
$DateofBirth = '';
|
||||||
|
$ContactNumber ='';
|
||||||
|
$EmailId = '';
|
||||||
|
$BloodGroup ='';
|
||||||
|
$MartialStatus = '';
|
||||||
|
$DateofJoining = '';
|
||||||
|
$PreviousYearsOfExp = '';
|
||||||
|
$Designation = '';
|
||||||
|
$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 = '';
|
||||||
|
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;
|
||||||
|
$ContactNumber = $Emp->ContactNumber;
|
||||||
|
$EmailId = $Emp->EmailId;
|
||||||
|
$BloodGroup = $Emp->BloodGroup;
|
||||||
|
$MartialStatus = $Emp->MartialStatus;
|
||||||
|
$DateofJoining = $Emp->DateofJoining;
|
||||||
|
$PreviousYearsOfExp = $Emp->PreviousYearsOfExp;
|
||||||
|
$Designation = $Emp->Designation;
|
||||||
|
$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;
|
||||||
|
$IsActive = $Emp->IsActive;
|
||||||
|
$ProfilePic = $Emp->ProfilePic;
|
||||||
|
$Reference_Name = $Emp->Reference_Name;
|
||||||
|
$Reference_ContactNumber = $Emp->Reference_ContactNumber;
|
||||||
|
$Remarks = $Emp->Remarks;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
$('#checksame').click(function(){
|
||||||
|
$('#permanentaddress').val($('#currentaddress').val());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function isNumberKey(evt)
|
||||||
|
{
|
||||||
|
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||||
|
if (charCode != 46 && charCode > 31
|
||||||
|
&& (charCode < 48 || charCode > 57))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//PAN Validate
|
||||||
|
function validatePAN() {
|
||||||
|
var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/;
|
||||||
|
|
||||||
|
var PAN = $('#panno').val();
|
||||||
|
|
||||||
|
if(PAN != '')
|
||||||
|
{
|
||||||
|
if (reg.test(PAN) == false)
|
||||||
|
{
|
||||||
|
alert('Please Enter Valid PAN 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($("#emailid").val().length < 1)
|
||||||
|
{
|
||||||
|
alert('Please Enter Email ID');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(!validateEmail())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($("option:selected", $("#gender")).val() == '-1')
|
||||||
|
{
|
||||||
|
alert('Please Select Gender');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($("option:selected", $("#MartialStatus")).val() == "-1")
|
||||||
|
{
|
||||||
|
alert('Please Select Martial Status');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($("option:selected", $("#bloodgroup")).val() == "-1")
|
||||||
|
{
|
||||||
|
alert('Please Select Blood group ');
|
||||||
|
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 = $('#emailid').val();
|
||||||
|
|
||||||
|
if(email != '')
|
||||||
|
{
|
||||||
|
if (reg.test(email) == false)
|
||||||
|
{
|
||||||
|
alert('Please Enter Valid Email Address');
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
function getAge() {
|
||||||
|
|
||||||
|
var dateString = $("#DateofBirth").val();
|
||||||
|
|
||||||
|
var today = new Date();
|
||||||
|
var birthDate = new Date(dateString);
|
||||||
|
|
||||||
|
|
||||||
|
var age = today.getFullYear() - birthDate.getFullYear();
|
||||||
|
var m = today.getMonth() - birthDate.getMonth();
|
||||||
|
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
||||||
|
age--;
|
||||||
|
}
|
||||||
|
$("#age").val(age);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$(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: 'mm/dd/yy',
|
||||||
|
|
||||||
|
});
|
||||||
|
$("#dateofjoining").datepicker({
|
||||||
|
minDate : new Date(year-SIAStartYear,1,1),
|
||||||
|
maxDate :'now',
|
||||||
|
dateFormat: 'mm/dd/yy'
|
||||||
|
|
||||||
|
});
|
||||||
|
$("#ValidTill").datepicker({dateFormat: 'mm/dd/yy',minDate :'now',});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
legend{
|
||||||
|
color:#00c0ef ! important;
|
||||||
|
}
|
||||||
|
.form-group
|
||||||
|
{
|
||||||
|
padding-bottom:4%;
|
||||||
|
}
|
||||||
|
.pad{
|
||||||
|
padding-bottom:1%;
|
||||||
|
}
|
||||||
|
.badge
|
||||||
|
{
|
||||||
|
color:red; background-color:#fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<CENTER>Siddharth Industries Employee Profile</CENTER>
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<div style="text-align:right;">
|
||||||
|
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-info" value="Back">Back</a>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<div class="row">
|
||||||
|
<!-- left column -->
|
||||||
|
<div class="col-md-12">
|
||||||
|
<!-- general form elements -->
|
||||||
|
|
||||||
|
<div class="box box-primary">
|
||||||
|
<!-- /.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" style="border:3px solid #3c8dbc;">
|
||||||
|
<form class="form-horizontal" role="form" >
|
||||||
|
<fieldset>
|
||||||
|
|
||||||
|
<!-- Form Name -->
|
||||||
|
<legend>Personal Information</legend>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="box-header">
|
||||||
|
<img id="profilepicture" src="<?php echo base_url().'uploads/images/'.$ProfilePic ; ?>" alt="your image" style="width: 139px;"/><br/>
|
||||||
|
<input type='file' onchange="readURL(this);" id="photo" 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="text" name="employeeid" id="employeeid" value="<?php echo $EmpID ; ?>" placeholder="Employee ID" class="form-control" readonly>
|
||||||
|
<br/><input type="checkbox" id="isactive" value="<?php echo $IsActive ; ?>" name="isactive" onclick="checkactive"> IsActive
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9">
|
||||||
|
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<span class="badge">*</span>
|
||||||
|
<input type="text" name="FirstName" maxlength="100" value="<?php echo $FirstName ; ?>" id="FirstName" placeholder="First Name" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6 pad"><span class="badge">*</span>
|
||||||
|
<input type="text" name="LastName" maxlength="100" id="LastName" value="<?php echo $LastName ; ?>" placeholder="Last Name" class="form-control" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 pad"><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>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 pad"><span class="badge">*</span>
|
||||||
|
<input id="DateofBirth" required name="DateofBirth" value="<?php echo $DateofBirth ; ?>" maxlength="10" placeholder="Date Of Birth" onchange="getAge();" class="form-control">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<input type="text" name="age" placeholder="Age" id="age" class="form-control" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<input type="text" name="ContactNumber" value="<?php echo $ContactNumber ; ?>" onchange="getMobileValidation();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="ContactNumber" required placeholder="Contact Number" maxlength="10" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<input type="mail" name="emailid" value="<?php echo $EmailId ; ?>" id="emailid" placeholder="Email ID" maxlength="100" class="form-control">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<select id="gender" name="gender" type="text" placeholder="Gender" required class="form-control">
|
||||||
|
<option value="<?php echo $Gender ; ?>"><?php echo $Gender; ?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($GenderList))
|
||||||
|
{
|
||||||
|
foreach ($GenderList as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Martial status" class="form-control">
|
||||||
|
<option value="<?php echo $MartialStatus ; ?>"><?php echo $MartialStatus; ?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($MartialList))
|
||||||
|
{
|
||||||
|
foreach ($MartialList as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-6 pad">
|
||||||
|
<select id="bloodgroup" name="bloodgroup" required class="form-control">
|
||||||
|
<option value="<?php echo $BloodGroup ; ?>"><?php echo $BloodGroup ?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($BloodGroupList))
|
||||||
|
{
|
||||||
|
foreach ($BloodGroupList as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Address Section -->
|
||||||
|
<!-- Form Name -->
|
||||||
|
<legend>Address Details</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-12"><span class="badge">*</span>
|
||||||
|
<input type="text" id="currentaddress" required name="currentaddress" value="<?php echo $PresentAddress ; ?>" maxlength="500" placeholder="Current Address" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-10">
|
||||||
|
<input type="checkbox" id="checksame" name="sameaddress" onclick="CheckClick"> Current address same as permanent address
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Text input-->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-12"><span class="badge">*</span>
|
||||||
|
<input type="text" id="permanentaddress" required name="permanentaddress" value="<?php echo $PermanentAddress; ?>" maxlength="500" placeholder="Permanent Address " class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Text input-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Emergency Contact Section -->
|
||||||
|
<!-- Form Name -->
|
||||||
|
<legend>Emergency Contact Information</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-6"><span class="badge">*</span>
|
||||||
|
<input type="text" id="emergencycontactname" maxlength="100" required name="emergencycontactname" value="<?php echo $EmergencyContactName ; ?>" placeholder="Emergency Contact Name" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6"><span class="badge">*</span>
|
||||||
|
<input type="text" id="emergencycontactnumber" required name="emergencycontactnumber" onchange="getValidEmergencyNumber();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" maxlength="10" value="<?php echo $EmergencyContactNumber; ?>" placeholder="Emergency Contact Number" class="form-control">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- profile Section -->
|
||||||
|
<!-- Form Name -->
|
||||||
|
<legend>Work Profile</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<select type="text" id="desigination" name="desigination" required class="form-control">
|
||||||
|
<option value="<?php echo $Designation ; ?>"><?php echo $Designation; ?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($DesignationList))
|
||||||
|
{
|
||||||
|
foreach ($DesignationList as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<select type="text" id="departmentname" name="departmentname" required class="form-control">
|
||||||
|
<option value="<?php echo $Departmentcode; ?>"><?php echo $Departmentcode." - ".$DepartmentName ;?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($DepartmentList))
|
||||||
|
{
|
||||||
|
foreach ($DepartmentList as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->DEPCode ?>"><?php echo $rl->DEPCode." - " .$rl->DepartmentName ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input id="dateofjoining" name="dateofjoining" value="<?php echo $DateofJoining; ?>" maxlength="10" required placeholder="Date Of Joining" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<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 class="form-group">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<select type="text" id="eduqualifaction" name="eduqualifaction" required class="form-control">
|
||||||
|
<option value="<?php echo $Edu_Qualification; ?>"><?php echo $Edu_Qualification ; ?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($QualificationList))
|
||||||
|
{
|
||||||
|
foreach ($QualificationList as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<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">
|
||||||
|
<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">
|
||||||
|
<input type="text" id="referrercontno" name="referrercontno" value="<?php echo $Reference_ContactNumber ; ?>" onchange="getValidReferNumber();" maxlength="10" onkeypress="return event.charCode >= 48 && event.charCode <= 57" placeholder="Referrer Contact Number" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<legend>Bank Details</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-3"><span class="badge">*</span>
|
||||||
|
<input type="text" id="accountno" onkeypress="return event.charCode >= 48 && event.charCode <= 57" maxlength="15" name="accountno" placeholder="Account Number" class="form-control" value="<?php echo $BankAccountNo ; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3"><span class="badge">*</span>
|
||||||
|
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code" maxlength="10" class="form-control" value="<?php echo $IFSCCode ; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3"><span class="badge">*</span>
|
||||||
|
<input type="text" id="bankbranchname" maxlength="200" name="bankbranchname" placeholder="Bank Branch Name" class="form-control" value="<?php echo $BankBranchName ; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3"><span class="badge">*</span>
|
||||||
|
<input type="text" id="bankaddress" maxlength="200" name="bankaddress" placeholder="Bank Address" class="form-control" value="<?php echo $BankAddress ; ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<legend>ID Proof</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" id="aadharno" name="aadharno" maxlength="50" placeholder="Aadhar Number" class="form-control" value="<?php echo $AadharNo ; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" id="panno" maxlength="10" name="panno" placeholder="PAN Number" onchange="validatePAN();" class="form-control" value="<?php echo $PANNo ; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="text" id="passportno" maxlength="8" onchange="ValidatePassport();" name="passportno" placeholder="Passport Number" class="form-control" value="<?php echo $PassportNo ; ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input id="ValidTill" name="ValidTill" maxlength="10" placeholder="ValidTill" class="form-control" value="<?php echo $Passport_Valid_till ; ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<legend>Additional Information</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<input type="text" id="addinfo" name="addinfo" placeholder="Additional Information" class="form-control" value="<?php echo $Remarks ; ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Command -->
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-3 col-md-offset-9">
|
||||||
|
<div class="pull-right">
|
||||||
|
<input type="button" id="cancel" class="btn btn-info" value="Cancel" />
|
||||||
|
<input type="submit" onclick="Validate();" class="btn btn-primary"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div><!-- /.col-lg-12 -->
|
||||||
|
</div><!-- /.row -->
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<?php
|
||||||
|
$this->load->helper('form');
|
||||||
|
$error = $this->session->flashdata('error');
|
||||||
|
if($error)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $this->session->flashdata('error'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php
|
||||||
|
$success = $this->session->flashdata('success');
|
||||||
|
if($success)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $this->session->flashdata('success'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php echo validation_errors('<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(); ?>assets/js/addUser.js" type="text/javascript"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$("#emailid").change(function () {
|
||||||
|
|
||||||
|
var id = $('#emailid').val();
|
||||||
|
if(validateEmail())
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
data:{id:id},
|
||||||
|
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>Employeedetails/CheckEmail",
|
||||||
|
success:function(data) {
|
||||||
|
if(data)
|
||||||
|
{
|
||||||
|
alert( data+""+" Employee already exists in the database.");
|
||||||
|
window.location = 'Employeedetails/employeeListing';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><u><a href="#" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
|
<td><u><a href="<?php echo base_url().'Employeedetails/ViewEmployee/?EmpID='.$record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
|
||||||
|
|
||||||
<td><?php echo $record->FirstName .' , '. $record->LastName; ?></td>
|
<td><?php echo $record->FirstName .' , '. $record->LastName; ?></td>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user