employee edit screen for updating a photo and cost center department
This commit is contained in:
parent
e3d4a0a43c
commit
67fc3325ce
@ -608,7 +608,7 @@ echo "<script>alert('Record Not Saved!');</script>";
|
|||||||
|
|
||||||
$this->load->model('employeedetails_model');
|
$this->load->model('employeedetails_model');
|
||||||
$EmpId = $this->input->post('employeeid');
|
$EmpId = $this->input->post('employeeid');
|
||||||
$PictureName = $this->input->post('Image');
|
$PictureName = $this->input->post('photo');
|
||||||
|
|
||||||
if ($PictureName != '')
|
if ($PictureName != '')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -126,7 +126,7 @@ $(function() {
|
|||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$options = array("0"=>'Select Department');
|
$options = array("0"=>'Select Department');
|
||||||
//print_r( $options);
|
//print_r( $options);
|
||||||
|
|
||||||
if(!empty($Department))
|
if(!empty($Department))
|
||||||
@ -714,6 +714,12 @@ function CountRows() {
|
|||||||
|
|
||||||
$('#addPop').click(function () {
|
$('#addPop').click(function () {
|
||||||
if ($('#distriList option:selected').val() != null) {
|
if ($('#distriList option:selected').val() != null) {
|
||||||
|
if($('#distriList option:selected').val()==0 ){
|
||||||
|
alert('please select Department');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
var tempSelect = $('#distriList option:selected').val();
|
var tempSelect = $('#distriList option:selected').val();
|
||||||
var tempText = $('#distriList option:selected').text();
|
var tempText = $('#distriList option:selected').text();
|
||||||
|
|
||||||
@ -743,6 +749,7 @@ function CountRows() {
|
|||||||
tempSelect = '';
|
tempSelect = '';
|
||||||
tempText = '';
|
tempText = '';
|
||||||
Selectedval = '';
|
Selectedval = '';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
alert("Before add please select any position.");
|
alert("Before add please select any position.");
|
||||||
}
|
}
|
||||||
@ -750,6 +757,12 @@ function CountRows() {
|
|||||||
|
|
||||||
$('#removePop').click(function () {
|
$('#removePop').click(function () {
|
||||||
if ($('#selectDistriList option:selected').val() != null) {
|
if ($('#selectDistriList option:selected').val() != null) {
|
||||||
|
if($('#selectDistriList option:selected').val() == 0){
|
||||||
|
//alert('cannot removed');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
Selectedval ='';
|
Selectedval ='';
|
||||||
$('#txtSelectedDepartment').val(Selectedval);
|
$('#txtSelectedDepartment').val(Selectedval);
|
||||||
@ -761,7 +774,9 @@ function CountRows() {
|
|||||||
|
|
||||||
$("#distriList").val(tempSelect);
|
$("#distriList").val(tempSelect);
|
||||||
tempSelect = '';
|
tempSelect = '';
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
alert("Before remove please select any position.");
|
alert("Before remove please select any position.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -315,13 +315,13 @@ function Validate()
|
|||||||
|
|
||||||
//corrected
|
//corrected
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#MaterialType").select2();
|
// $("#MaterialType").select2();
|
||||||
|
|
||||||
$("#MaterialCategory").select2();
|
// $("#MaterialCategory").select2();
|
||||||
$("#UOM").select2();
|
// $("#UOM").select2();
|
||||||
$("#Assetcode").select2();
|
// $("#Assetcode").select2();
|
||||||
$("#Costcenter").select2();
|
// $("#Costcenter").select2();
|
||||||
$("#conversionfactorUOM").select2();
|
// $("#conversionfactorUOM").select2();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -10,9 +10,9 @@ $(function() {
|
|||||||
var mindt = year-70;
|
var mindt = year-70;
|
||||||
var maxdt = year-15;
|
var maxdt = year-15;
|
||||||
|
|
||||||
$("#PONO").select2();
|
// $("#PONO").select2();
|
||||||
$("#SelectMaterialCode").select2();
|
// $("#SelectMaterialCode").select2();
|
||||||
$("#AssetStatus").select2();
|
//$("#AssetStatus").select2();
|
||||||
|
|
||||||
$("#DateOfCommission").datepicker({
|
$("#DateOfCommission").datepicker({
|
||||||
minDate : new Date(year-SIAStartYear,1,1),
|
minDate : new Date(year-SIAStartYear,1,1),
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#gender").select2();
|
// $("#gender").select2();
|
||||||
$("#bloodgroup").select2();
|
// $("#bloodgroup").select2();
|
||||||
$("#MartialStatus").select2();
|
// $("#MartialStatus").select2();
|
||||||
$("#desigination").select2();
|
// $("#desigination").select2();
|
||||||
$("#departmentname").select2();
|
// $("#departmentname").select2();
|
||||||
$("#eduqualifaction").select2();
|
// $("#eduqualifaction").select2();
|
||||||
});
|
});
|
||||||
function driver_designition()
|
function driver_designition()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -263,7 +263,7 @@ $(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#Payment").select2();
|
//$("#Payment").select2();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -518,12 +518,12 @@ function ValidatePassport()
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#gender").select2();
|
// $("#gender").select2();
|
||||||
$("#bloodgroup").select2();
|
// $("#bloodgroup").select2();
|
||||||
$("#MartialStatus").select2();
|
// $("#MartialStatus").select2();
|
||||||
$("#desigination").select2();
|
// $("#desigination").select2();
|
||||||
$("#departmentname").select2();
|
// $("#departmentname").select2();
|
||||||
$("#eduqualifaction").select2();
|
// $("#eduqualifaction").select2();
|
||||||
});
|
});
|
||||||
|
|
||||||
function onlyAlphabets(evt) {
|
function onlyAlphabets(evt) {
|
||||||
@ -600,10 +600,10 @@ function onlyAlphabets(evt) {
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<img id="profilepicture" src="<?php echo base_url().'uploads/images/'.$ProfilePic ; ?>" alt="your image" style="width: 139px;"/><br/>
|
<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"/>
|
<input type='file' onchange="readURL(this);" id="photo" value="<?php echo $ProfilePic ; ?>" name="photo"/>
|
||||||
<label for="photo">Select profile picture<br/><small>(only .jpg or .png)</small></label>
|
<label for="photo">Select profile picture<br/><small>(only .jpg or .png)</small></label>
|
||||||
|
|
||||||
<input type="hidden" name="Image" id="Image" value="<?php echo $ProfilePic ; ?>" class="form-control" readonly>
|
<!-- <input type="hidden" name="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>
|
<input type="text" name="employeeid" id="employeeid" value="<?php echo $EmpID ; ?>" placeholder="Employee ID" class="form-control" readonly>
|
||||||
|
|
||||||
<input type="checkbox" id="isactive" <?php echo $IsActive;?> name="isactive" value="1"> IS ACTIVE
|
<input type="checkbox" id="isactive" <?php echo $IsActive;?> name="isactive" value="1"> IS ACTIVE
|
||||||
|
|||||||
@ -52,10 +52,10 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
//$("#MaterialType").select2();
|
//$("#MaterialType").select2();
|
||||||
//$("#MaterialCategory").select2();
|
//$("#MaterialCategory").select2();
|
||||||
$("#UOM").select2();
|
// $("#UOM").select2();
|
||||||
$("#Assetcode").select2();
|
// $("#Assetcode").select2();
|
||||||
$("#Costcenter").select2();
|
// $("#Costcenter").select2();
|
||||||
$("#conversionfactorUOM").select2();
|
// $("#conversionfactorUOM").select2();
|
||||||
|
|
||||||
var x = $("#MaterialCategory").val() == 'Spares';
|
var x = $("#MaterialCategory").val() == 'Spares';
|
||||||
if(x)
|
if(x)
|
||||||
|
|||||||
@ -113,9 +113,9 @@ $(function() {
|
|||||||
var mindt = year-70;
|
var mindt = year-70;
|
||||||
var maxdt = year-15;
|
var maxdt = year-15;
|
||||||
|
|
||||||
$("#PONO").select2();
|
// $("#PONO").select2();
|
||||||
$("#SelectMaterialCode").select2();
|
// $("#SelectMaterialCode").select2();
|
||||||
$("#AssetStatus").select2();
|
// $("#AssetStatus").select2();
|
||||||
|
|
||||||
$("#DateOfCommission").datepicker({
|
$("#DateOfCommission").datepicker({
|
||||||
minDate : new Date(year-SIAStartYear,1,1),
|
minDate : new Date(year-SIAStartYear,1,1),
|
||||||
|
|||||||
@ -808,6 +808,10 @@ $('.tempClickEdit').click(function(){
|
|||||||
<script>
|
<script>
|
||||||
$('#addPop').click(function () {
|
$('#addPop').click(function () {
|
||||||
if ($('#distriList option:selected').val() != null) {
|
if ($('#distriList option:selected').val() != null) {
|
||||||
|
if($('#distriList option:selected').val()==0 ){
|
||||||
|
alert('please select Department');
|
||||||
|
}
|
||||||
|
else{
|
||||||
var tempSelect = $('#distriList option:selected').val();
|
var tempSelect = $('#distriList option:selected').val();
|
||||||
var tempText = $('#distriList option:selected').text();
|
var tempText = $('#distriList option:selected').text();
|
||||||
//alert(tempSelect);
|
//alert(tempSelect);
|
||||||
@ -869,7 +873,7 @@ $('.tempClickEdit').click(function(){
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
alert("Before add please select any position.");
|
alert("Before add please select any position.");
|
||||||
}
|
}
|
||||||
@ -877,6 +881,10 @@ $('.tempClickEdit').click(function(){
|
|||||||
|
|
||||||
$('#removePop').click(function () {
|
$('#removePop').click(function () {
|
||||||
if ($('#selectDistriList option:selected').val() != null) {
|
if ($('#selectDistriList option:selected').val() != null) {
|
||||||
|
if($('#selectDistriList option:selected').val() == 0){
|
||||||
|
//alert('cannot removed');
|
||||||
|
}
|
||||||
|
else{
|
||||||
var tempSelect = $('#selectDistriList option:selected').val();
|
var tempSelect = $('#selectDistriList option:selected').val();
|
||||||
$('#selectDistriList option:selected').remove().appendTo('#distriList');
|
$('#selectDistriList option:selected').remove().appendTo('#distriList');
|
||||||
$("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
$("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
||||||
@ -913,7 +921,7 @@ $('.tempClickEdit').click(function(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ if(!empty($supplier))
|
|||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#PaymentTerms").select2();
|
//$("#PaymentTerms").select2();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user