employee upload option issues fixes
This commit is contained in:
parent
ffc09629db
commit
1146b98723
@ -565,8 +565,9 @@ class employeedetails extends BaseController
|
|||||||
'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
|
'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
|
||||||
'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,
|
'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,
|
||||||
'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,
|
'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,
|
||||||
'LicenseValidtill'=>$License_ExpiryDate,'PFNO'=>$PFno,'ESI'=>$ESIno,
|
'LicenseValidtill'=>$License_ExpiryDate,'PFNO'=>$PFno,'ESI'=>$ESIno,'NomineeDetails'=>$Nominee,
|
||||||
'NomineeDetails'=>$Nominee,'AadharNo'=>$aadharfilename,'PANNo'=>$panfilename,'VoterID'=>$voterfilename);
|
'AadharNo'=>$aadharno,'PANNo'=>$panno,'VoterID'=>$VoterID,
|
||||||
|
'AadharFile'=>$aadharfilename,'PANFile'=>$panfilename,'VoterFile'=>$voterfilename);
|
||||||
|
|
||||||
$this->load->model('employeedetails_model');
|
$this->load->model('employeedetails_model');
|
||||||
|
|
||||||
@ -649,8 +650,8 @@ class employeedetails extends BaseController
|
|||||||
$this->form_validation->set_rules('departmentname', 'departmentname', 'callback_Dep_validate');
|
$this->form_validation->set_rules('departmentname', 'departmentname', 'callback_Dep_validate');
|
||||||
$this->form_validation->set_rules('eduqualifaction', 'eduqualifaction', 'callback_select_validate');
|
$this->form_validation->set_rules('eduqualifaction', 'eduqualifaction', 'callback_select_validate');
|
||||||
$this->form_validation->set_rules('referrercontno', 'referrercontno', 'trim|min_length[10]|max_length[10]');
|
$this->form_validation->set_rules('referrercontno', 'referrercontno', 'trim|min_length[10]|max_length[10]');
|
||||||
//$this->form_validation->set_rules('aadharno', 'aadharno ','trim|max_length[14]');
|
$this->form_validation->set_rules('aadharno', 'aadharno ','trim|max_length[14]');
|
||||||
//$this->form_validation->set_rules('panno', 'panno', 'trim|max_length[10]');
|
$this->form_validation->set_rules('panno', 'panno', 'trim|max_length[10]');
|
||||||
$this->form_validation->set_rules('passportno', 'passportno', 'trim|min_length[9]|max_length[9]');
|
$this->form_validation->set_rules('passportno', 'passportno', 'trim|min_length[9]|max_length[9]');
|
||||||
$this->form_validation->set_rules('accountno', 'accountno', 'trim|min_length[10]|max_length[20]');
|
$this->form_validation->set_rules('accountno', 'accountno', 'trim|min_length[10]|max_length[20]');
|
||||||
$this->form_validation->set_rules('pfno', 'pfno', 'trim|min_length[22]|max_length[22]');
|
$this->form_validation->set_rules('pfno', 'pfno', 'trim|min_length[22]|max_length[22]');
|
||||||
@ -722,15 +723,16 @@ class employeedetails extends BaseController
|
|||||||
$bankbranchname = $this->input->post('bankbranchname');
|
$bankbranchname = $this->input->post('bankbranchname');
|
||||||
$bankaddress = $this->input->post('bankaddress');
|
$bankaddress = $this->input->post('bankaddress');
|
||||||
$aadharno = $this->input->post('aadharno');
|
$aadharno = $this->input->post('aadharno');
|
||||||
//$panno = strtoupper($this->input->post('panno'));
|
$fileaadharno = $this->input->post('fileaadhar');
|
||||||
$panno = $this->input->post('panno');
|
$panno = strtoupper($this->input->post('panno'));
|
||||||
|
$filepanno = $this->input->post('filepanno');
|
||||||
$passportno = strtoupper($this->input->post('passportno'));
|
$passportno = strtoupper($this->input->post('passportno'));
|
||||||
$ValidTill = $this->input->post('ValidTill');
|
$ValidTill = $this->input->post('ValidTill');
|
||||||
$addinfo = $this->input->post('addinfo');
|
$addinfo = $this->input->post('addinfo');
|
||||||
$driverlicense = strtoupper($this->input->post ( 'Driverlicense' ));
|
$driverlicense = strtoupper($this->input->post ( 'Driverlicense' ));
|
||||||
$licenseExpiryDate = $this->input->post ( 'LicenseExpiryDate' );
|
$licenseExpiryDate = $this->input->post ( 'LicenseExpiryDate' );
|
||||||
//$VoterID = strtoupper($this->input->post ( 'VoterID' ));
|
$VoterID = strtoupper($this->input->post ( 'VoterID' ));
|
||||||
$VoterID = $this->input->post ( 'VoterID' );
|
$filevoterid = $this->input->post ( 'filevoter' );
|
||||||
$pfno = strtoupper($this->input->post('pfno'));
|
$pfno = strtoupper($this->input->post('pfno'));
|
||||||
$esino = $this->input->post('esino');
|
$esino = $this->input->post('esino');
|
||||||
$Nominee = $this->input->post('nomineename');
|
$Nominee = $this->input->post('nomineename');
|
||||||
@ -764,9 +766,9 @@ class employeedetails extends BaseController
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
$voter = (!empty($VoterID)) ? $VoterID : $voterfilename ;
|
$filevoter = (!empty($filevoterid)) ? $filevoterid : $voterfilename ;
|
||||||
$pan = (!empty($panno)) ? $panno : $panfilename;
|
$filepan = (!empty($filepanno)) ? $filepanno : $panfilename;
|
||||||
$aadhar = (!empty($aadharno)) ? $aadharno : $aadharfilename;
|
$fileaadhar = (!empty($fileaadharno)) ? $fileaadharno : $aadharfilename;
|
||||||
|
|
||||||
if( $chked != '')
|
if( $chked != '')
|
||||||
{
|
{
|
||||||
@ -813,7 +815,8 @@ class employeedetails extends BaseController
|
|||||||
'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
|
'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,
|
||||||
'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'UpdatedBY'=>$UpdatedBY,
|
'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'UpdatedBY'=>$UpdatedBY,
|
||||||
'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,
|
'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,
|
||||||
'VoterID'=>$voter,'PFNO'=>$pfno,'ESI'=>$esino,'NomineeDetails'=>$Nominee);
|
'VoterID'=>$voter,'PFNO'=>$pfno,'ESI'=>$esino,'NomineeDetails'=>$Nominee,
|
||||||
|
'AadharFile'=>$fileaadhar,'PANFile'=>$filepan,'VoterFile'=>$filevoter);
|
||||||
// print_r($Employee);
|
// print_r($Employee);
|
||||||
$result = $this->employeedetails_model->UpdateEmployee($Employee,$EmpId);
|
$result = $this->employeedetails_model->UpdateEmployee($Employee,$EmpId);
|
||||||
|
|
||||||
|
|||||||
@ -238,9 +238,9 @@ class employeedetails_model extends CI_Model
|
|||||||
|
|
||||||
function removefiles($value,$Empid){
|
function removefiles($value,$Empid){
|
||||||
$str = explode("/",$value);
|
$str = explode("/",$value);
|
||||||
if($str[0] == 'pan'){ $this->db->set('PANNo', null); }
|
if($str[0] == 'pan'){ $this->db->set('PANFile', null); }
|
||||||
else if( $str[0] == 'aadhar'){ $this->db->set('AadharNo', null); }
|
else if( $str[0] == 'aadhar'){ $this->db->set('AadharFile', null); }
|
||||||
else if( $str[0] == 'voter'){ $this->db->set('VoterID', null); }
|
else if( $str[0] == 'voter'){ $this->db->set('VoterFile', null); }
|
||||||
unlink("uploads/images/".$str[1]);
|
unlink("uploads/images/".$str[1]);
|
||||||
$this->db->where('EmpID =',$Empid);
|
$this->db->where('EmpID =',$Empid);
|
||||||
$this->db->update('T_Employee_Details');
|
$this->db->update('T_Employee_Details');
|
||||||
|
|||||||
@ -272,24 +272,24 @@
|
|||||||
|
|
||||||
<legend>ID Proof</legend>
|
<legend>ID Proof</legend>
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<!-- <div class="col-md-3"><span>Aadhar Number</span>
|
<div class="col-md-3"><span>Aadhar Number</span>
|
||||||
<input type="text" id="aadharno" name="aadharno" maxlength="14" onchange="ValidateAadhar();" class="form-control" onkeypress="return isNumberKey(event)">
|
<input type="text" id="aadharno" name="aadharno" maxlength="14" onchange="ValidateAadhar();" class="form-control" onkeypress="return isNumberKey(event)">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span>PAN Number</span>
|
<div class="col-md-3"><span>PAN Number</span>
|
||||||
<input type="text" id="panno" maxlength="10" style="text-transform:uppercase" name="panno" onchange="validatePAN();" class="form-control" pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}" title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) " onkeypress="return alpha(event);">
|
<input type="text" id="panno" maxlength="10" style="text-transform:uppercase" name="panno" onchange="validatePAN();" class="form-control" pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}" title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) " onkeypress="return alpha(event);">
|
||||||
</div> -->
|
</div>
|
||||||
<div class="col-md-3"><span>Passport Number</span>
|
<div class="col-md-3"><span>Passport Number</span>
|
||||||
<input type="text" id="passportno" maxlength="9" onchange="ValidatePassport();" name="passportno" style="text-transform:uppercase" class="form-control" pattern="[aA-prPR-wyWY]{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)" onkeypress="return alpha(event);">
|
<input type="text" id="passportno" maxlength="9" onchange="ValidatePassport();" name="passportno" style="text-transform:uppercase" class="form-control" pattern="[aA-prPR-wyWY]{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)" onkeypress="return alpha(event);">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span>Passport Expiry Date</span>
|
<div class="col-md-3"><span>Passport Expiry Date</span>
|
||||||
<input id="ValidTill" name="ValidTill" onkeypress="return false;" maxlength="10" class="form-control">
|
<input id="ValidTill" name="ValidTill" onkeypress="return false;" maxlength="10" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<!-- </div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-3"><span>Voter ID</span>
|
<div class="col-md-3"><span>Voter ID</span>
|
||||||
<input type="text" id="VoterID" name="voterID" maxlength="12" class="form-control" style="text-transform: uppercase" >
|
<input type="text" id="VoterID" name="voterID" maxlength="12" class="form-control" style="text-transform: uppercase" >
|
||||||
</div> -->
|
</div>
|
||||||
<div class="col-md-3"><span>Driving License</span>
|
<div class="col-md-3"><span>Driving License</span>
|
||||||
<input type="text" id="Driverlicense" onchange="validateDriverLicense();" style="text-transform:uppercase" pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}" title="EX:TN82 12345678900" maxlength="16" name="driverlicense" class="form-control" onkeypress="return alpha(event);">
|
<input type="text" id="Driverlicense" onchange="validateDriverLicense();" style="text-transform:uppercase" pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}" title="EX:TN82 12345678900" maxlength="16" name="driverlicense" class="form-control" onkeypress="return alpha(event);">
|
||||||
</div>
|
</div>
|
||||||
@ -397,6 +397,11 @@ $(function() {
|
|||||||
$("#eduqualifaction").select2();
|
$("#eduqualifaction").select2();
|
||||||
$("#bankbranchname").select2();
|
$("#bankbranchname").select2();
|
||||||
|
|
||||||
|
$('#aadharno').on('keypress change', function () {
|
||||||
|
$(this).val(function (index, value) {
|
||||||
|
return value.replace(/\W/gi, '').replace(/(.{4})/g, '$1 ');
|
||||||
|
});
|
||||||
|
});
|
||||||
// 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();
|
// e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
|
||||||
// });
|
// });
|
||||||
@ -526,47 +531,50 @@ function onlyAlphabets(evt) {
|
|||||||
|
|
||||||
|
|
||||||
//PAN Validate
|
//PAN Validate
|
||||||
// function validatePAN() {
|
function validatePAN() {
|
||||||
// //var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/;
|
//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 regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/;
|
||||||
// var PAN = $('#panno').val();
|
var PAN = $('#panno').val();
|
||||||
|
|
||||||
// if(PAN != '')
|
if(PAN != '')
|
||||||
// {
|
{
|
||||||
// if (regpan.test(PAN) == false)
|
if (regpan.test(PAN) == false)
|
||||||
// {
|
{
|
||||||
// swal('Please Enter Valid PAN Number');
|
swal('Please Enter Valid PAN Number');
|
||||||
// return (false);
|
return (false);
|
||||||
// }
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ValidateAadhar(){
|
||||||
|
var reg = /^\d{4}\s\d{4}\s\d{4}$/;
|
||||||
|
var aadhar = $('#aadharno').val();
|
||||||
|
|
||||||
|
if(aadhar != '' )
|
||||||
|
{
|
||||||
|
if(reg.test(aadhar)== false)
|
||||||
|
{
|
||||||
|
alert('Please Enter Valid Aadhar Number');
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//alert('value inserted into database');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// return true;
|
// //alert('aadhar is blank');
|
||||||
|
// alert('please Enter Aadhar number');
|
||||||
// }
|
// }
|
||||||
// }
|
}
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// function ValidateAadhar(){
|
|
||||||
// //var reg = /^\d{12}$/
|
|
||||||
// var reg = /^\d{4}\s\d{4}\s\d{4}$/
|
|
||||||
// var aadhar = $('#aadharno').val();
|
|
||||||
// //var aadhar_count = $('#aadharno').val().length;
|
|
||||||
|
|
||||||
// if(aadhar != '' )// && aadhar_count != '')
|
|
||||||
// {
|
|
||||||
// if(reg.test(aadhar)== false)
|
|
||||||
// {
|
|
||||||
// swal('Please Enter Valid Aadhar Number');
|
|
||||||
// return (false);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getMobileValidation() {
|
function getMobileValidation() {
|
||||||
var contactNumber = $('#ContactNumber').val().length;
|
var contactNumber = $('#ContactNumber').val().length;
|
||||||
@ -798,7 +806,6 @@ function Validate()
|
|||||||
else if(!getMobileValidation())
|
else if(!getMobileValidation())
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
|
|
||||||
if($("#emailid").val().length < 1)
|
if($("#emailid").val().length < 1)
|
||||||
{
|
{
|
||||||
swal('Please Enter Personal Email ID');
|
swal('Please Enter Personal Email ID');
|
||||||
@ -895,6 +902,7 @@ function Validate()
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// validation for employee email address already exists are not
|
||||||
$("#emailid").change(function () {
|
$("#emailid").change(function () {
|
||||||
|
|
||||||
var id = $('#emailid').val();
|
var id = $('#emailid').val();
|
||||||
@ -959,6 +967,137 @@ function Validate()
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// validation for employee pan no already exists are not
|
||||||
|
$('#panno').change(function() {
|
||||||
|
|
||||||
|
var id = $('#panno').val();
|
||||||
|
if(id != '')
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
data:{id:id},
|
||||||
|
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>employeedetails/checkPAN",
|
||||||
|
success:function(data) {
|
||||||
|
if(data)
|
||||||
|
{
|
||||||
|
// alert( data+""+" Employee already exists in the database.Please Change the Pan Card Number");
|
||||||
|
// $('#panno').val('');
|
||||||
|
// $('#panno').focus();
|
||||||
|
|
||||||
|
// var answer = confirm(data + " " +" Employee details is already exists in the database.Do you want to change the Employee details?")
|
||||||
|
// if (answer)
|
||||||
|
// {
|
||||||
|
// $('#panno').val('');
|
||||||
|
// $('#panno').focus();
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// alert('please edit the PAN number in the Edit employee screen');
|
||||||
|
// window.location = 'employeedetails/employeeListing';
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
swal({
|
||||||
|
title: data+" "+" Pan Card Number already exists in the database.",
|
||||||
|
text: " Do you want to Change the Pan Card Number ?",
|
||||||
|
type: "info",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: '#5d0411',
|
||||||
|
confirmButtonText: "Yes",
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false
|
||||||
|
},
|
||||||
|
function(isConfirm){
|
||||||
|
|
||||||
|
if (isConfirm){
|
||||||
|
swal.close();
|
||||||
|
$('#panno').val('');
|
||||||
|
$('#panno').focus();
|
||||||
|
return false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
swal("Cancelled", "please edit the Pan Card Number in the edit employee screen", "error");
|
||||||
|
window.location = 'employeedetails/employeeListing';
|
||||||
|
}
|
||||||
|
|
||||||
|
});//sweet alert closed....
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// validation for employee aadharar number already exists are not
|
||||||
|
$('#aadharno').change(function() {
|
||||||
|
|
||||||
|
var id = $('#aadharno').val();
|
||||||
|
if(id != '')
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
data:{id:id},
|
||||||
|
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>employeedetails/checkAadharNo",
|
||||||
|
success:function(data) {
|
||||||
|
if(data)
|
||||||
|
{
|
||||||
|
// alert( data+""+" Employee already exists in the database.Please Change the Aadhar card Number");
|
||||||
|
// $('#aadharno').val('');
|
||||||
|
// $('#aadharno').focus();
|
||||||
|
|
||||||
|
// var answer = confirm(data + " " +" employee details is already exists in the database.Do you want to change the Employee details?")
|
||||||
|
// if (answer)
|
||||||
|
// {
|
||||||
|
// $('#aadharno').val('');
|
||||||
|
// $('#aadharno').focus();
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// alert('please edit the aadhar number in the edit employee screen');
|
||||||
|
// window.location = 'employeedetails/employeeListing';
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
swal({
|
||||||
|
title: data+" "+" Aadhar card Number already exists in the database.",
|
||||||
|
text: " Do you want to change the Aadhar card Number ?",
|
||||||
|
type: "info",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: '#5d0411',
|
||||||
|
confirmButtonText: "Yes",
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false
|
||||||
|
},
|
||||||
|
function(isConfirm){
|
||||||
|
|
||||||
|
if (isConfirm){
|
||||||
|
swal.close();
|
||||||
|
$('#aadharno').val('');
|
||||||
|
$('#aadharno').focus();
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
swal("Cancelled", "please edit the Aadhar card Number in the edit employee screen", "error");
|
||||||
|
window.location = 'employeedetails/employeeListing';
|
||||||
|
}
|
||||||
|
|
||||||
|
});//sweet alert closed....
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#bankbranchname').change(function()
|
$('#bankbranchname').change(function()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,6 +45,9 @@
|
|||||||
$pfno = '';
|
$pfno = '';
|
||||||
$esino = '';
|
$esino = '';
|
||||||
$nominee ='';
|
$nominee ='';
|
||||||
|
$fileaadhar = '';
|
||||||
|
$filepan = '' ;
|
||||||
|
$filevoter = '';
|
||||||
|
|
||||||
if(!empty($EmpDetails))
|
if(!empty($EmpDetails))
|
||||||
{
|
{
|
||||||
@ -108,9 +111,12 @@ if(!empty($EmpDetails))
|
|||||||
$VoterID = $Emp->VoterID;
|
$VoterID = $Emp->VoterID;
|
||||||
|
|
||||||
$a=array();
|
$a=array();
|
||||||
if (!empty($AadharNo)){array_push($a,$AadharNo);}
|
$fileaadhar = $Emp->AadharFile;
|
||||||
if (!empty($PANNo)){array_push($a,$PANNo); }
|
$filepan = $Emp->PANFile;
|
||||||
if (!empty($VoterID)){array_push($a,$VoterID); }
|
$filevoter = $Emp->VoterFile;
|
||||||
|
if (!empty($fileaadhar)){array_push($a,$fileaadhar);}
|
||||||
|
if (!empty($filepan)){array_push($a,$filepan); }
|
||||||
|
if (!empty($filevoter)){array_push($a,$filevoter); }
|
||||||
//print_r($a);
|
//print_r($a);
|
||||||
|
|
||||||
$pfno = $Emp->PFNO;
|
$pfno = $Emp->PFNO;
|
||||||
@ -558,14 +564,12 @@ if(!empty($EmpDetails))
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<!-- <div class="col-md-3"><span>Aadhar Number</span> -->
|
<div class="col-md-3"><span>Aadhar Number</span>
|
||||||
<input type="hidden" id="aadharno" name="aadharno" placeholder="Aadhar Number" value="<?php echo $AadharNo ; ?>" title=" : 12 digit number">
|
<input type="text" id="aadharno" name="aadharno" maxlength="14" placeholder="Aadhar Number" onchange="ValidateAadhar();" class="form-control num" value="<?php echo $AadharNo ; ?>" title=" : 12 digit number"><!-- onkeypress="return isNumberKey(event)"> -->
|
||||||
<!-- <input type="text" id="aadharno" name="aadharno" 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>
|
||||||
<div class="col-md-3"><span>PAN Number</span> -->
|
|
||||||
<input type="hidden" id="panno" name="panno" placeholder="PAN Number" class="form-control" value="<?php echo $PANNo ; ?>" >
|
|
||||||
<!-- <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>
|
<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">
|
<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>
|
||||||
@ -573,11 +577,11 @@ if(!empty($EmpDetails))
|
|||||||
<div class="col-md-3"><span>Passport Expiry Date</span>
|
<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 ; ?>">
|
<input id="ValidTill" name="ValidTill" maxlength="10" placeholder="Passport Expiry Date" class="form-control" value="<?php echo $DOPassport ; ?>">
|
||||||
</div>
|
</div>
|
||||||
<!-- </div>
|
</div>
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-3"><span>Voter ID</span> -->
|
<div class="col-md-3"><span>Voter ID</span>
|
||||||
<input type="hidden" id="VoterID" name="VoterID" value="<?php echo $VoterID;?>" class="form-control" placeholder="VoterID" >
|
<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>
|
||||||
<div class="col-md-3"><span>Driving License</span>
|
<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-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);">
|
<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);">
|
||||||
@ -625,6 +629,9 @@ if(!empty($EmpDetails))
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="newdiv"></div><!-- this div for add more section-->
|
<div id="newdiv"></div><!-- this div for add more section-->
|
||||||
|
<input type="hidden" name="fileaadhar" id="fileaadhar" value="<?php echo $fileaadhar ; ?>" readonly placeholder="Aadhar File"/>
|
||||||
|
<input type="hidden" name="filepanno" id="filepanno" value="<?php echo $filepan ; ?>" readonly placeholder="PAN File"/>
|
||||||
|
<input type="hidden" name="filevoter" id="filevoter" value="<?php echo $filevoter ; ?>" readonly placeholder="Voter File"/>
|
||||||
<input type="hidden" name="hidecounter" id="hidecounter" value="0" readonly/>
|
<input type="hidden" name="hidecounter" id="hidecounter" value="0" readonly/>
|
||||||
<input type="hidden" name="hideconstant" id="hideconstant" value="0" readonly/>
|
<input type="hidden" name="hideconstant" id="hideconstant" value="0" readonly/>
|
||||||
<input type="hidden" name="validatecounter" id="validatecounter" value="0" readonly/>
|
<input type="hidden" name="validatecounter" id="validatecounter" value="0" readonly/>
|
||||||
@ -740,6 +747,12 @@ $(function() {
|
|||||||
$("#eduqualifaction").select2();
|
$("#eduqualifaction").select2();
|
||||||
$("#bankbranchname").select2();
|
$("#bankbranchname").select2();
|
||||||
|
|
||||||
|
$('#aadharno').on('keypress change', function () {
|
||||||
|
$(this).val(function (index, value) {
|
||||||
|
return value.replace(/\W/gi, '').replace(/(.{4})/g, '$1 ');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$('#checksame').click(function(){
|
$('#checksame').click(function(){
|
||||||
if ($('#checksame').prop('checked')) {
|
if ($('#checksame').prop('checked')) {
|
||||||
$('#permanentaddress').val($('#currentaddress').val());
|
$('#permanentaddress').val($('#currentaddress').val());
|
||||||
@ -842,68 +855,60 @@ function onlyAlphabets(evt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//PAN Validate
|
//PAN Validate
|
||||||
// function validatePAN() {
|
function validatePAN() {
|
||||||
// //var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/;
|
//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 regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/;
|
||||||
|
|
||||||
// var PAN = $('#panno').val();
|
var PAN = $('#panno').val();
|
||||||
|
|
||||||
// if(PAN != '')
|
if(PAN != '')
|
||||||
// {
|
{
|
||||||
// if (regpan.test(PAN) == false)
|
if (regpan.test(PAN) == false)
|
||||||
// {
|
{
|
||||||
// swal('Please Enter Valid PAN Number');
|
swal('Please Enter Valid PAN Number');
|
||||||
// return (false);
|
return (false);
|
||||||
// }
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
swal('Please Enter PAN Number');
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ValidateAadhar(){
|
||||||
|
|
||||||
|
var reg = /^\d{4}\s\d{4}\s\d{4}$/;
|
||||||
|
var aadhar = $('#aadharno').val();
|
||||||
|
var aadhar_count = $('#aadharno').val().length;
|
||||||
|
|
||||||
|
if(aadhar != '' )
|
||||||
|
{
|
||||||
|
|
||||||
|
if(reg.test(aadhar)== false)
|
||||||
|
{
|
||||||
|
|
||||||
|
swal('Please Enter Valid Aadhar Number');
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//alert('value inserted into database');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
// return true;
|
//alert('aadhar is blank');
|
||||||
// }
|
//alert('please Enter Aadhar number');
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// swal('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');
|
|
||||||
// swal('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() {
|
function validateDriverLicense() {
|
||||||
|
|
||||||
@ -1237,54 +1242,54 @@ function Validate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
// $('#panno').change(function() {
|
$('#panno').change(function() {
|
||||||
|
|
||||||
// var id = $('#panno').val();
|
var id = $('#panno').val();
|
||||||
// if(id != '')
|
if(id != '')
|
||||||
// {
|
{
|
||||||
// $.ajax({
|
$.ajax({
|
||||||
// data:{id:id},
|
data:{id:id},
|
||||||
|
|
||||||
// type:"POST",
|
type:"POST",
|
||||||
// url:"<?php echo base_url();?>employeedetails/checkPAN",
|
url:"<?php echo base_url();?>employeedetails/checkPAN",
|
||||||
// success:function(data) {
|
success:function(data) {
|
||||||
// if(data)
|
if(data)
|
||||||
// {swal( data+""+" Employee already exists in the database.Please Change the Pan Card Number");
|
{swal( data+""+" Employee already exists in the database.Please Change the Pan Card Number");
|
||||||
// $('#panno').val('');
|
$('#panno').val('');
|
||||||
// $('#panno').focus();
|
$('#panno').focus();
|
||||||
// //return false;
|
//return false;
|
||||||
// //window.location = 'Employeedetails/employeeListing';
|
//window.location = 'Employeedetails/employeeListing';
|
||||||
// }
|
}
|
||||||
|
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
// });
|
});
|
||||||
// $('#aadharno').change(function() {
|
$('#aadharno').change(function() {
|
||||||
|
|
||||||
// var id = $('#aadharno').val();
|
var id = $('#aadharno').val();
|
||||||
// if(id != '')
|
if(id != '')
|
||||||
// {
|
{
|
||||||
// $.ajax({
|
$.ajax({
|
||||||
// data:{id:id},
|
data:{id:id},
|
||||||
// type:"POST",
|
type:"POST",
|
||||||
// url:"<?php echo base_url();?>employeedetails/checkAadharNo",
|
url:"<?php echo base_url();?>employeedetails/checkAadharNo",
|
||||||
// success:function(data) {
|
success:function(data) {
|
||||||
// if(data)
|
if(data)
|
||||||
// {
|
{
|
||||||
// swal( data+""+" Employee already exists in the database.Please Change the Aadhar card Number");
|
swal( data+""+" Employee already exists in the database.Please Change the Aadhar card Number");
|
||||||
// $('#aadharno').val('');
|
$('#aadharno').val('');
|
||||||
// $('#aadharno').focus();
|
$('#aadharno').focus();
|
||||||
// //return false;
|
//return false;
|
||||||
// //window.location = 'Employeedetails/employeeListing';
|
//window.location = 'Employeedetails/employeeListing';
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
// });
|
});
|
||||||
|
|
||||||
$('#bankbranchname').change(function()
|
$('#bankbranchname').change(function()
|
||||||
{
|
{
|
||||||
@ -1311,8 +1316,6 @@ function Validate()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
$("#addmorebutton").click(function(){
|
$("#addmorebutton").click(function(){
|
||||||
|
|
||||||
if(validatecounter > 2){
|
if(validatecounter > 2){
|
||||||
@ -1391,9 +1394,9 @@ div.innerHTML='<div class="col-md-12">'+
|
|||||||
//alert(arr[1]);
|
//alert(arr[1]);
|
||||||
temparray.splice($.inArray(arr[0], temparray), 1);
|
temparray.splice($.inArray(arr[0], temparray), 1);
|
||||||
|
|
||||||
if(arr[0] == 'pan' ){ $('#panno').val(''); }
|
if(arr[0] == 'pan' ){ $('#filepanno').val(''); }
|
||||||
else if(arr[0] == 'voter' ){ $('#VoterID').val(''); }
|
else if(arr[0] == 'voter' ){ $('#filevoter').val(''); }
|
||||||
else if(arr[0] == 'aadhar' ){ $('#aadharno').val(''); }
|
else if(arr[0] == 'aadhar' ){ $('#fileaadhar').val(''); }
|
||||||
|
|
||||||
counter--;
|
counter--;
|
||||||
validatecounter--;
|
validatecounter--;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user