Add employee view updated
This commit is contained in:
parent
08890fc617
commit
fe75a6f74b
@ -1,9 +1,181 @@
|
||||
|
||||
<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($("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($("option:selected", $("#desigination")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Desigination ');
|
||||
return;
|
||||
}
|
||||
if($("option:selected", $("#departmentname")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Department name');
|
||||
return;
|
||||
}
|
||||
if($("option:selected", $("#eduqualifaction")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Qualification');
|
||||
return;
|
||||
}
|
||||
if(!validateEmail())
|
||||
{
|
||||
alert('Please Enter Valid Email Address');
|
||||
return ;
|
||||
}
|
||||
|
||||
}
|
||||
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',});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</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> Employee Create Details</CENTER>
|
||||
<CENTER>Siddharth Industries Employee Profile</CENTER>
|
||||
|
||||
</h1>
|
||||
|
||||
@ -18,116 +190,133 @@
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<!-- general form elements -->
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<CENTER><h3 class="box-title">Add Employee Details</h3></CENTER>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box box-primary">
|
||||
<!-- /.box-header -->
|
||||
<!-- form start -->
|
||||
|
||||
<form role="form" id="addemployee" action="<?php echo base_url() ?>Employeedetails/addNewemployee" method="post" role="form">
|
||||
|
||||
<!-- Name Section -->
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<form class="form-horizontal" role="form">
|
||||
<fieldset>
|
||||
<div class="row">
|
||||
<!-- Form Name -->
|
||||
<legend>Personal Information Details</legend>
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<input type="file" onchange="previewFile()"><br>
|
||||
|
||||
<form role="form" id="addemployee" action="<?php echo base_url() ?>Employeedetails/AddNewEmployee" method="post" enctype="multipart/form-data">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="fistName" placeholder="First Name" class="form-control">
|
||||
<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(); ?>assets/dist/img/avatar.png" 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="text" name="employeeid" id="employeeid" placeholder="Employee ID" class="form-control" readonly>
|
||||
<br/><input type="checkbox" id="isactive" name="isactive" onclick="checkactive"> IsActive
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="col-md-6 pad">
|
||||
|
||||
<input type="text" name="FirstName" id="FirstName" placeholder="First Name" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="lastName" placeholder="Last Name" class="form-control">
|
||||
<div class="col-md-6 pad">
|
||||
<input type="text" name="LastName" id="LastName" placeholder="Last Name" class="form-control" required>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="date" placeholder="Date Of Birth" class="form-control">
|
||||
<div class="col-md-6 pad">
|
||||
<input type="text" name="FatherName" id="FatherName" placeholder="Father / Husband Name" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4">
|
||||
<input type="number" placeholder="Age" class="form-control">
|
||||
<div class="col-md-6 pad">
|
||||
<input id="DateofBirth" required name="DateofBirth" placeholder="Date Of Birth" onchange="getAge();" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="eFistName" placeholder="Contact Name" class="form-control">
|
||||
|
||||
<div class="col-md-6 pad">
|
||||
<input type="text" name="age" placeholder="Age" id="age" class="form-control" readonly>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="eMiddleName" placeholder="Email ID" class="form-control">
|
||||
<div class="col-md-6 pad">
|
||||
<input type="text" name="contactnumber" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="contactnumber" required placeholder="Contact Number" maxlength="10" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-md-4">
|
||||
<select type="gender" placeholder="Gender" class="form-control">
|
||||
<option value="female">Female</option>
|
||||
<option value="male">Male</option>
|
||||
<div class="col-md-6 pad">
|
||||
<input type="mail" name="emailid" id="emailid" placeholder="Email ID" 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="-1">Select Gender</option>
|
||||
<?php
|
||||
if(!empty($Gender))
|
||||
{
|
||||
foreach ($Gender as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-md-4">
|
||||
<select type="gender" placeholder="Martial status" class="form-control">
|
||||
<option value="single">Single</option>
|
||||
<option value="married">Married</option>
|
||||
|
||||
<div class="col-md-6 pad">
|
||||
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Martial status" class="form-control">
|
||||
<option value="-1">Select Martial Status</option>
|
||||
<?php
|
||||
if(!empty($Martial))
|
||||
{
|
||||
foreach ($Martial as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Select Basic -->
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<select id="blood_group" name="blood_group" class="form-control">
|
||||
<option value="-1">Select Blood group</option>
|
||||
<option value="1">A+</option>
|
||||
<option value="2">B+</option>
|
||||
<option value="3">AB+</option>
|
||||
<option value="4">O+</option>
|
||||
<option value="5">A-</option>
|
||||
<option value="6">B-</option>
|
||||
<option value="7">AB-</option>
|
||||
<option value="8">O-</option>
|
||||
</select>
|
||||
<div class="col-md-6 pad">
|
||||
<select id="bloodgroup" name="bloodgroup" required class="form-control">
|
||||
<option value="-1">Select Blood group</option>
|
||||
<?php
|
||||
if(!empty($BloodGroup))
|
||||
{
|
||||
foreach ($BloodGroup 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-10">
|
||||
<input type="text" name="currentaddress" placeholder="Current Address" class="form-control">
|
||||
<div class="col-md-12">
|
||||
<input type="text" id="currentaddress" required name="currentaddress" placeholder="Current Address" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-2">
|
||||
<input type="checkbox" name="sameaddress"> Current address same as permanent address
|
||||
<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-10">
|
||||
<input type="text" name="permanentaddress" placeholder="permanent Address " class="form-control">
|
||||
<div class="col-md-12">
|
||||
<input type="text" id="permanentaddress" required name="permanentaddress" placeholder="Permanent Address " class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Text input-->
|
||||
@ -139,11 +328,11 @@
|
||||
<legend>Emergency Contact Information</legend>
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="eFistName" placeholder="Emergency Contact Name" class="form-control">
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="emergencycontactname" required name="emergencycontactname" placeholder="Emergency Contact Name" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="eMiddleName" placeholder="Emergency Contact Number" class="form-control">
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="emergencycontactnumber" required name="emergencycontactnumber" onkeypress="return event.charCode >= 48 && event.charCode <= 57" maxlength="10" placeholder="Emergency Contact Number" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -156,31 +345,73 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="desigination" placeholder="Desigination" class="form-control">
|
||||
<select type="text" id="desigination" name="desigination" required class="form-control">
|
||||
<option value="-1">Select Designation</option>
|
||||
<?php
|
||||
if(!empty($Designation))
|
||||
{
|
||||
foreach ($Designation as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="departmentname" placeholder="Department Name" class="form-control">
|
||||
<select type="text" id="departmentname" name="departmentname" required class="form-control">
|
||||
<option value="-1">Select Department</option>
|
||||
<?php
|
||||
if(!empty($Department))
|
||||
{
|
||||
foreach ($Department as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->DEPCode ?>"><?php echo $rl->DEPCode." - " .$rl->DepartmentName ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="date" placeholder="Date Of Joining" class="form-control">
|
||||
<input id="dateofjoining" name="dateofjoining" required placeholder="Date Of Joining" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="totalexpe" placeholder="Total Experience" class="form-control">
|
||||
<input type="text" id="Previousexperience" name="Previousexperience" onkeypress="return isNumberKey(event)" placeholder="Previous Years of Experience" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="eduquali" placeholder="Education Qualification" class="form-control">
|
||||
<select type="text" id="eduqualifaction" name="eduqualifaction" required class="form-control">
|
||||
<option value="-1">Select Qualification</option>
|
||||
<?php
|
||||
if(!empty($Qualification))
|
||||
{
|
||||
foreach ($Qualification as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="addquali" placeholder="Additional Qualification" class="form-control">
|
||||
<input type="text" id="addqualification" name="addqualification" placeholder="Additional Qualification" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="referredby" placeholder="Referred By" class="form-control">
|
||||
<input type="text" id="referredby" name="referredby" placeholder="Referred By" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="refcontno" placeholder="Referred Contact Number" class="form-control">
|
||||
<input type="text" id="referrercontno" name="referrercontno" placeholder="Referrer Contact Number" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -189,16 +420,16 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="accountno" placeholder="Account Number" class="form-control">
|
||||
<input type="text" id="accountno" onkeypress="return event.charCode >= 48 && event.charCode <= 57" name="accountno" placeholder="Account Number" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="ifsccode" placeholder="IFSC Code" class="form-control">
|
||||
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="bankbranchname" placeholder="Bank Branch Name" class="form-control">
|
||||
<input type="text" id="bankbranchname" name="bankbranchname" placeholder="Bank Branch Name" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="bankaddress" placeholder="Bank Address" class="form-control">
|
||||
<input type="text" id="bankaddress" name="bankaddress" placeholder="Bank Address" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -207,16 +438,16 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="aadharno" placeholder="Aadhar Number" class="form-control">
|
||||
<input type="text" id="aadharno" name="aadharno" placeholder="Aadhar Number" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="panno" placeholder="PAN Number" class="form-control">
|
||||
<input type="text" id="panno" name="panno" placeholder="PAN Number" onblur="validatePAN();" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="passportno" placeholder="Passport Number" class="form-control">
|
||||
<input type="text" id="passportno" name="passportno" placeholder="Passport Number" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="date" placeholder="" class="form-control">
|
||||
<input id="ValidTill" name="ValidTill" placeholder="ValidTill" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -224,15 +455,19 @@
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<input type="text" name="addinfo" placeholder="Additional Information" class="form-control">
|
||||
<input type="text" id="addinfo" name="addinfo" placeholder="Additional Information" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Command -->
|
||||
|
||||
|
||||
|
||||
<!-- Command -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-5 col-md-offset-1">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
<button type="submit" class="btn btn-default">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
<input type="reset" id="reset" class="btn btn-info" value="Reset" />
|
||||
<input type="submit" onclick="Validate();" class="btn btn-primary"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -240,10 +475,7 @@
|
||||
</form>
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user