employee edit screen for updating a photo and cost center department

This commit is contained in:
venbatechnologies@gmail.com 2017-08-19 20:00:18 +05:30
parent e3d4a0a43c
commit 67fc3325ce
11 changed files with 61 additions and 38 deletions

View File

@ -608,7 +608,7 @@ echo "<script>alert('Record Not Saved!');</script>";
$this->load->model('employeedetails_model');
$EmpId = $this->input->post('employeeid');
$PictureName = $this->input->post('Image');
$PictureName = $this->input->post('photo');
if ($PictureName != '')
{

View File

@ -126,7 +126,7 @@ $(function() {
<div>
<?php
$options = array("0"=>'Select Department');
$options = array("0"=>'Select Department');
//print_r( $options);
if(!empty($Department))
@ -714,6 +714,12 @@ function CountRows() {
$('#addPop').click(function () {
if ($('#distriList option:selected').val() != null) {
if($('#distriList option:selected').val()==0 ){
alert('please select Department');
}
else
{
var tempSelect = $('#distriList option:selected').val();
var tempText = $('#distriList option:selected').text();
@ -743,6 +749,7 @@ function CountRows() {
tempSelect = '';
tempText = '';
Selectedval = '';
}
} else {
alert("Before add please select any position.");
}
@ -750,6 +757,12 @@ function CountRows() {
$('#removePop').click(function () {
if ($('#selectDistriList option:selected').val() != null) {
if($('#selectDistriList option:selected').val() == 0){
//alert('cannot removed');
}
else
{
Selectedval ='';
$('#txtSelectedDepartment').val(Selectedval);
@ -761,7 +774,9 @@ function CountRows() {
$("#distriList").val(tempSelect);
tempSelect = '';
} else {
}
}
else {
alert("Before remove please select any position.");
}
});

View File

@ -315,13 +315,13 @@ function Validate()
//corrected
$(document).ready(function(){
$("#MaterialType").select2();
// $("#MaterialType").select2();
$("#MaterialCategory").select2();
$("#UOM").select2();
$("#Assetcode").select2();
$("#Costcenter").select2();
$("#conversionfactorUOM").select2();
// $("#MaterialCategory").select2();
// $("#UOM").select2();
// $("#Assetcode").select2();
// $("#Costcenter").select2();
// $("#conversionfactorUOM").select2();
});

View File

@ -10,9 +10,9 @@ $(function() {
var mindt = year-70;
var maxdt = year-15;
$("#PONO").select2();
$("#SelectMaterialCode").select2();
$("#AssetStatus").select2();
// $("#PONO").select2();
// $("#SelectMaterialCode").select2();
//$("#AssetStatus").select2();
$("#DateOfCommission").datepicker({
minDate : new Date(year-SIAStartYear,1,1),

View File

@ -1,11 +1,11 @@
<script>
$(document).ready(function(){
$("#gender").select2();
$("#bloodgroup").select2();
$("#MartialStatus").select2();
$("#desigination").select2();
$("#departmentname").select2();
$("#eduqualifaction").select2();
// $("#gender").select2();
// $("#bloodgroup").select2();
// $("#MartialStatus").select2();
// $("#desigination").select2();
// $("#departmentname").select2();
// $("#eduqualifaction").select2();
});
function driver_designition()
{

View File

@ -263,7 +263,7 @@ $(function() {
});
$(document).ready(function(){
$("#Payment").select2();
//$("#Payment").select2();
});

View File

@ -518,12 +518,12 @@ function ValidatePassport()
}
$(document).ready(function(){
$("#gender").select2();
$("#bloodgroup").select2();
$("#MartialStatus").select2();
$("#desigination").select2();
$("#departmentname").select2();
$("#eduqualifaction").select2();
// $("#gender").select2();
// $("#bloodgroup").select2();
// $("#MartialStatus").select2();
// $("#desigination").select2();
// $("#departmentname").select2();
// $("#eduqualifaction").select2();
});
function onlyAlphabets(evt) {
@ -600,10 +600,10 @@ function onlyAlphabets(evt) {
<div class="col-md-3">
<div class="box-header">
<img id="profilepicture" src="<?php echo base_url().'uploads/images/'.$ProfilePic ; ?>" alt="your image" style="width: 139px;"/><br/>
<input type='file' onchange="readURL(this);" id="photo" name="photo"/>
<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>
<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="checkbox" id="isactive" <?php echo $IsActive;?> name="isactive" value="1"> IS ACTIVE

View File

@ -52,10 +52,10 @@ $(document).ready(function(){
//$("#MaterialType").select2();
//$("#MaterialCategory").select2();
$("#UOM").select2();
$("#Assetcode").select2();
$("#Costcenter").select2();
$("#conversionfactorUOM").select2();
// $("#UOM").select2();
// $("#Assetcode").select2();
// $("#Costcenter").select2();
// $("#conversionfactorUOM").select2();
var x = $("#MaterialCategory").val() == 'Spares';
if(x)

View File

@ -113,9 +113,9 @@ $(function() {
var mindt = year-70;
var maxdt = year-15;
$("#PONO").select2();
$("#SelectMaterialCode").select2();
$("#AssetStatus").select2();
// $("#PONO").select2();
// $("#SelectMaterialCode").select2();
// $("#AssetStatus").select2();
$("#DateOfCommission").datepicker({
minDate : new Date(year-SIAStartYear,1,1),

View File

@ -808,6 +808,10 @@ $('.tempClickEdit').click(function(){
<script>
$('#addPop').click(function () {
if ($('#distriList option:selected').val() != null) {
if($('#distriList option:selected').val()==0 ){
alert('please select Department');
}
else{
var tempSelect = $('#distriList option:selected').val();
var tempText = $('#distriList option:selected').text();
//alert(tempSelect);
@ -869,7 +873,7 @@ $('.tempClickEdit').click(function(){
}
}
else {
alert("Before add please select any position.");
}
@ -877,6 +881,10 @@ $('.tempClickEdit').click(function(){
$('#removePop').click(function () {
if ($('#selectDistriList option:selected').val() != null) {
if($('#selectDistriList option:selected').val() == 0){
//alert('cannot removed');
}
else{
var tempSelect = $('#selectDistriList option:selected').val();
$('#selectDistriList option:selected').remove().appendTo('#distriList');
$("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
@ -913,7 +921,7 @@ $('.tempClickEdit').click(function(){
}
}

View File

@ -125,7 +125,7 @@ if(!empty($supplier))
?>
<script>
$(document).ready(function(){
$("#PaymentTerms").select2();
//$("#PaymentTerms").select2();
});