add edit employee file upload
This commit is contained in:
parent
877db92512
commit
0c00f37cb9
@ -338,11 +338,25 @@ class Employeedetails extends BaseController
|
|||||||
if ($result) {
|
if ($result) {
|
||||||
|
|
||||||
// Get the uploaded files
|
// Get the uploaded files
|
||||||
$files = $this->request->getFiles();
|
$files1 = $this->request->getFile('emp_file1');
|
||||||
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
$files2 = $this->request->getFile('emp_file2');
|
||||||
if (isset($files['emp_file'])) {
|
$files3 = $this->request->getFile('emp_file3');
|
||||||
foreach ($files['emp_file'] as $index => $file) {
|
$files4 = $this->request->getFile('emp_file4');
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
$files5 = $this->request->getFile('emp_file5');
|
||||||
|
|
||||||
|
$files=[$files1,$files2,$files3,$files4,$files5];
|
||||||
|
|
||||||
|
$fileName1 = $this->request->getPost('file_name1');
|
||||||
|
$fileName2 = $this->request->getPost('file_name2');
|
||||||
|
$fileName3 = $this->request->getPost('file_name3');
|
||||||
|
$fileName4 = $this->request->getPost('file_name4');
|
||||||
|
$fileName5 = $this->request->getPost('file_name5');
|
||||||
|
|
||||||
|
$fileNames=[$fileName1,$fileName2,$fileName3,$fileName4,$fileName5];
|
||||||
|
|
||||||
|
if (!empty($files)) {
|
||||||
|
foreach ($files as $index => $file) {
|
||||||
|
if ($ffile && $file->isValid() && !$file->hasMoved()) {
|
||||||
// Move the file to the desired directory
|
// Move the file to the desired directory
|
||||||
$newName = $file->getRandomName();
|
$newName = $file->getRandomName();
|
||||||
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||||
@ -619,12 +633,6 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
$EmpId = $this->request->getPost('employeeid');
|
$EmpId = $this->request->getPost('employeeid');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$EmpId = $this->request->getPost('employeeid');
|
$EmpId = $this->request->getPost('employeeid');
|
||||||
$PictureName = $this->request->getPost('Image');
|
$PictureName = $this->request->getPost('Image');
|
||||||
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
||||||
@ -816,12 +824,27 @@ class Employeedetails extends BaseController
|
|||||||
//print_r($Employee);die();
|
//print_r($Employee);die();
|
||||||
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
||||||
|
|
||||||
|
|
||||||
// Get the uploaded files
|
// Get the uploaded files
|
||||||
$files = $this->request->getFiles();
|
$files1 = $this->request->getFile('emp_file1');
|
||||||
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
$files2 = $this->request->getFile('emp_file2');
|
||||||
if (isset($files['emp_file'])) {
|
$files3 = $this->request->getFile('emp_file3');
|
||||||
foreach ($files['emp_file'] as $index => $file) {
|
$files4 = $this->request->getFile('emp_file4');
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
$files5 = $this->request->getFile('emp_file5');
|
||||||
|
|
||||||
|
$files=[$files1,$files2,$files3,$files4,$files5];
|
||||||
|
|
||||||
|
$fileName1 = $this->request->getPost('file_name1');
|
||||||
|
$fileName2 = $this->request->getPost('file_name2');
|
||||||
|
$fileName3 = $this->request->getPost('file_name3');
|
||||||
|
$fileName4 = $this->request->getPost('file_name4');
|
||||||
|
$fileName5 = $this->request->getPost('file_name5');
|
||||||
|
|
||||||
|
$fileNames=[$fileName1,$fileName2,$fileName3,$fileName4,$fileName5];
|
||||||
|
|
||||||
|
if (!empty($files)) {
|
||||||
|
foreach ($files as $index => $file) {
|
||||||
|
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||||
// Move the file to the desired directory
|
// Move the file to the desired directory
|
||||||
$newName = $file->getRandomName();
|
$newName = $file->getRandomName();
|
||||||
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||||
@ -830,7 +853,7 @@ class Employeedetails extends BaseController
|
|||||||
$this->empFiles->save([
|
$this->empFiles->save([
|
||||||
'file_name' => $fileNames[$index], // User-entered file name
|
'file_name' => $fileNames[$index], // User-entered file name
|
||||||
'emp_file' => $newName, // New file name
|
'emp_file' => $newName, // New file name
|
||||||
'emp_id' => $EmpId,
|
'emp_id' => $result,
|
||||||
'path' => $path
|
'path' => $path
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|||||||
@ -423,13 +423,7 @@
|
|||||||
<span class="d-none d-sm-inline">Proof</span>
|
<span class="d-none d-sm-inline">Proof</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" data-target-form="#fileForm">
|
|
||||||
<a href="#fivth" data-toggle="tab" class="nav-link">
|
|
||||||
<!-- <a data-toggle="tab" class="nav-link"> -->
|
|
||||||
<span class="number">5</span>
|
|
||||||
<span class="d-none d-sm-inline">File Upload</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content mb-0 b-0">
|
<div class="tab-content mb-0 b-0">
|
||||||
@ -1004,7 +998,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="fourth">
|
<div class="tab-pane fade" id="fourth">
|
||||||
<form id="proofForm" method="post" action="#" class="form-horizontal">
|
<form id="proofForm" method="post" action="#" class="form-horizontal" enctype="multipart/form-data">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
</div>
|
</div>
|
||||||
@ -1016,6 +1010,24 @@
|
|||||||
onchange="ValidateAadhar();" class="form-control"
|
onchange="ValidateAadhar();" class="form-control"
|
||||||
onkeypress="return isNumberKey(event)" required>
|
onkeypress="return isNumberKey(event)" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name1" maxlength="255"
|
||||||
|
class="form-control" value="Aadhar">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select Aadhar File</label>
|
||||||
|
<input type="file" name="emp_file1" class="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3"><label>PAN Number</label>
|
<div class="col-md-3"><label>PAN Number</label>
|
||||||
<input type="text" id="panno" maxlength="10"
|
<input type="text" id="panno" maxlength="10"
|
||||||
style="text-transform:uppercase" name="panno"
|
style="text-transform:uppercase" name="panno"
|
||||||
@ -1024,6 +1036,26 @@
|
|||||||
title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) "
|
title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) "
|
||||||
onkeypress="return alpha(event);">
|
onkeypress="return alpha(event);">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>PAN File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name2" maxlength="255"
|
||||||
|
class="form-control" value="PAN">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select PAN File</label>
|
||||||
|
<input type="file" name="emp_file2" class="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3"><label>Passport Number</label>
|
<div class="col-md-3"><label>Passport Number</label>
|
||||||
<input type="text" id="passportno" maxlength="9"
|
<input type="text" id="passportno" maxlength="9"
|
||||||
onchange="ValidatePassport();" name="passportno"
|
onchange="ValidatePassport();" name="passportno"
|
||||||
@ -1032,10 +1064,49 @@
|
|||||||
The first character cannot be Q, X or Z. (eg:A12 34567)" onkeypress="return alpha(event);">
|
The first character cannot be Q, X or Z. (eg:A12 34567)" onkeypress="return alpha(event);">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Passport File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name3" maxlength="255"
|
||||||
|
class="form-control" value="Passport">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select Passport File</label>
|
||||||
|
<input type="file" name="emp_file3" class="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Bank PassBok Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name4" maxlength="255"
|
||||||
|
class="form-control" value="Bank Passbook">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Bank PassBok File</label>
|
||||||
|
<input type="file" name="emp_file4" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Other Document File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name5" maxlength="255"
|
||||||
|
class="form-control" value="Other Document">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Other Document File </label>
|
||||||
|
<input type="file" name="emp_file5" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -1043,48 +1114,11 @@
|
|||||||
<ul class="list-inline wizard mb-0">
|
<ul class="list-inline wizard mb-0">
|
||||||
<li class="previous list-inline-item"><a href="javascript: void(0);" class="btn btn-secondary">Previous</a>
|
<li class="previous list-inline-item"><a href="javascript: void(0);" class="btn btn-secondary">Previous</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="next list-inline-item float-right"><a href="javascript: void(0);" class="btn btn-secondary">Next</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tab-pane fade" id="fivth">
|
|
||||||
<form id="fileForm" method="post" action="#" class="form-horizontal" enctype="multipart/form-data" style="height: 250px;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-1">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-11">
|
|
||||||
<div class="row">
|
|
||||||
<!-- <div class="files"> -->
|
|
||||||
<div class="col-md-4">
|
|
||||||
<label>File Name</label>
|
|
||||||
<input type="text" id="file_name" name="file_name[]" maxlength="255"
|
|
||||||
class="form-control">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<label>File</label>
|
|
||||||
<input type="file" name="emp_file[]" class="form-control">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" style="margin-top: 32px;">
|
|
||||||
<button type="button" class="btn btn-primary btn-sm a1"
|
|
||||||
onclick="appendFilesFileds()" id="day">
|
|
||||||
Add
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div id="filesContainer" class="col-12"></div>
|
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<ul class="list-inline wizard mb-0">
|
|
||||||
<li class="previous list-inline-item"><a href="javascript: void(0);" class="btn btn-secondary">Previous</a>
|
|
||||||
</li>
|
|
||||||
<!-- <li class="next list-inline-item float-right"> -->
|
|
||||||
<button type="submit" class="btn btn-primary submit float-right">Submit</button>
|
<button type="submit" class="btn btn-primary submit float-right">Submit</button>
|
||||||
<!-- </li> -->
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- tab-content -->
|
</div> <!-- tab-content -->
|
||||||
</div> <!-- end #rootwizard-->
|
</div> <!-- end #rootwizard-->
|
||||||
@ -1123,28 +1157,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendFilesFileds(data) {
|
|
||||||
var newRowHtml = `
|
|
||||||
<div class="pad row">
|
|
||||||
<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) {
|
function removeContact(button) {
|
||||||
$(button).closest('.pad').remove();
|
$(button).closest('.pad').remove();
|
||||||
$('#filesContainer .a1').hide();
|
$('#filesContainer .a1').hide();
|
||||||
@ -1458,7 +1470,7 @@
|
|||||||
var combinedFormData = new FormData(); // Use FormData to handle files
|
var combinedFormData = new FormData(); // Use FormData to handle files
|
||||||
|
|
||||||
// List of form IDs you want to combine
|
// List of form IDs you want to combine
|
||||||
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
|
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm',]; // Add all your form IDs here
|
||||||
|
|
||||||
formIds.forEach(function(formId) {
|
formIds.forEach(function(formId) {
|
||||||
var $form = $(formId);
|
var $form = $(formId);
|
||||||
|
|||||||
@ -191,13 +191,7 @@ if (!empty($EmpDetails)) {
|
|||||||
<span class="d-none d-sm-inline">Proof</span>
|
<span class="d-none d-sm-inline">Proof</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" data-target-form="#fileForm">
|
|
||||||
<a href="#fivth" data-toggle="tab" class="nav-link">
|
|
||||||
<!-- <a data-toggle="tab" class="nav-link"> -->
|
|
||||||
<span class="number">5</span>
|
|
||||||
<span class="d-none d-sm-inline">File Upload</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content mb-0 b-0">
|
<div class="tab-content mb-0 b-0">
|
||||||
@ -913,74 +907,19 @@ if (!empty($EmpDetails)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="fourth">
|
<div class="tab-pane fade" id="fourth">
|
||||||
<form id="proofForm" method="post" action="#" class="form-horizontal">
|
<form id="proofForm" method="post" enctype="multipart/form-data" action="#" class="form-horizontal">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-11">
|
<div class="col-md-11">
|
||||||
<div class="row">
|
<?php if (count($emp_data) > 0) {
|
||||||
<div class="col-md-3">
|
|
||||||
<label>Aadhar Number</label> <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">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label>PAN Number</label>
|
|
||||||
<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">
|
|
||||||
<label>Passport Number</label>
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<ul class="list-inline wizard mb-0">
|
|
||||||
<li class="previous list-inline-item"><a href="javascript: void(0);"
|
|
||||||
class="btn btn-secondary">Previous</a>
|
|
||||||
</li>
|
|
||||||
<li class="next list-inline-item float-right"><a href="javascript: void(0);"
|
|
||||||
class="btn btn-secondary">Next</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tab-pane fade" id="fivth">
|
|
||||||
<form id="fileForm" method="post" action="#" class="form-horizontal">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-1">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-11">
|
|
||||||
<!-- <div class="row"> -->
|
|
||||||
<!-- <div class="files"> -->
|
|
||||||
|
|
||||||
<?php if (count($emp_data) > 0) { ?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php foreach ($emp_data as $key => $value) { ?>
|
<!-- previous code -->
|
||||||
|
<!-- <div class="row">
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<label>File Name</label>
|
<label>File Name</label>
|
||||||
@ -1002,54 +941,211 @@ if (!empty($EmpDetails)) {
|
|||||||
id="<?= $value['id']; ?>"
|
id="<?= $value['id']; ?>"
|
||||||
onclick="removeContact(this)">Delete
|
onclick="removeContact(this)">Delete
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-primary btn-sm a1"
|
|
||||||
onclick="appendFilesFileds()" id="day"
|
|
||||||
style="display: inline-block;">
|
|
||||||
Add New File
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php }
|
</div> -->
|
||||||
} else { ?>
|
|
||||||
|
<!-- new code -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-3"><label>Aadhar Number</label> <span
|
||||||
|
class="badge">*</span>
|
||||||
|
<input type="text" id="aadharno" name="aadharno" maxlength="14"
|
||||||
|
onchange="ValidateAadhar();" class="form-control"
|
||||||
|
onkeypress="return isNumberKey(event)" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
<label>File Name</label>
|
<label>File Name</label>
|
||||||
<input type="text" id="file_name" name="file_name[]"
|
<input type="text" id="file_name" name="file_name1" maxlength="255"
|
||||||
maxlength="255" class="form-control">
|
class="form-control" value="<?= $value['emp_file']?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-3">
|
||||||
<label>File</label>
|
<label>Select Aadhar File</label>
|
||||||
<input type="file" name="emp_file[]" class="form-control">
|
<input type="file" name="emp_file1" class="" value="">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" style="margin-top: 32px;">
|
</div>
|
||||||
<button type="button" class="btn btn-primary btn-sm a1"
|
|
||||||
onclick="appendFilesFileds()" id="day">
|
<div class="row">
|
||||||
Add
|
|
||||||
</button>
|
<div class="col-md-3"><label>PAN Number</label>
|
||||||
|
<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 class="col-md-3">
|
||||||
|
<label>PAN File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name2" maxlength="255"
|
||||||
|
class="form-control" value="PAN">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select PAN File</label>
|
||||||
|
<input type="file" name="emp_file2" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-3"><label>Passport Number</label>
|
||||||
|
<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 class="col-md-3">
|
||||||
|
<label>Passport File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name3" maxlength="255"
|
||||||
|
class="form-control" value="Passport">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select Passport File</label>
|
||||||
|
<input type="file" name="emp_file3" class="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Bank PassBok Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name4" maxlength="255"
|
||||||
|
class="form-control" value="Bank Passbook">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Bank PassBok File</label>
|
||||||
|
<input type="file" name="emp_file4" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Other Document File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name5" maxlength="255"
|
||||||
|
class="form-control" value="Other Document">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Other Document File </label>
|
||||||
|
<input type="file" name="emp_file5" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"><label>Aadhar Number</label> <span
|
||||||
|
class="badge">*</span>
|
||||||
|
<input type="text" id="aadharno" name="aadharno" maxlength="14"
|
||||||
|
onchange="ValidateAadhar();" class="form-control"
|
||||||
|
onkeypress="return isNumberKey(event)" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name1" maxlength="255"
|
||||||
|
class="form-control" value="Aadhar">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select Aadhar File</label>
|
||||||
|
<input type="file" name="emp_file1" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-3"><label>PAN Number</label>
|
||||||
|
<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 class="col-md-3">
|
||||||
|
<label>PAN File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name2" maxlength="255"
|
||||||
|
class="form-control" value="PAN">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select PAN File</label>
|
||||||
|
<input type="file" name="emp_file2" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-3"><label>Passport Number</label>
|
||||||
|
<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 class="col-md-3">
|
||||||
|
<label>Passport File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name3" maxlength="255"
|
||||||
|
class="form-control" value="Passport">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Select Passport File</label>
|
||||||
|
<input type="file" name="emp_file3" class="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Bank PassBok Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name4" maxlength="255"
|
||||||
|
class="form-control" value="Bank Passbook">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Bank PassBok File</label>
|
||||||
|
<input type="file" name="emp_file4" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Other Document File Name</label>
|
||||||
|
<input type="text" id="file_name" name="file_name5" maxlength="255"
|
||||||
|
class="form-control" value="Other Document">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Other Document File </label>
|
||||||
|
<input type="file" name="emp_file5" class="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="filesContainer" class="col-12"></div>
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<ul class="list-inline wizard mb-0">
|
<ul class="list-inline wizard mb-0">
|
||||||
<li class="previous list-inline-item"><a href="javascript: void(0);"
|
<li class="previous list-inline-item"><a href="javascript: void(0);"
|
||||||
class="btn btn-secondary">Previous</a>
|
class="btn btn-secondary">Previous</a>
|
||||||
</li>
|
</li>
|
||||||
<!-- <li class="next list-inline-item float-right"> -->
|
<li class="next list-inline-item float-right">
|
||||||
<button type="submit" class="btn btn-primary submit float-right">Submit</button>
|
<button type="submit" class="btn btn-primary submit float-right">Submit</button>
|
||||||
<!-- </li> -->
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- tab-content -->
|
</div> <!-- tab-content -->
|
||||||
</div> <!-- end #rootwizard-->
|
</div> <!-- end #rootwizard-->
|
||||||
@ -1534,28 +1630,6 @@ if (!empty($EmpDetails)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendFilesFileds(data) {
|
|
||||||
var newRowHtml = `
|
|
||||||
<div class="pad row">
|
|
||||||
<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) {
|
function removeContact(button) {
|
||||||
if (button.id != '') {
|
if (button.id != '') {
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
@ -1773,7 +1847,7 @@ if (!empty($EmpDetails)) {
|
|||||||
var isValid = true;
|
var isValid = true;
|
||||||
var combinedFormData = new FormData();
|
var combinedFormData = new FormData();
|
||||||
|
|
||||||
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
|
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm']; // Add all your form IDs here
|
||||||
formIds.forEach(function(formId) {
|
formIds.forEach(function(formId) {
|
||||||
var $form = $(formId);
|
var $form = $(formId);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user