department details edit page and corrections
This commit is contained in:
parent
affef22b25
commit
9aeb0cf912
@ -231,11 +231,11 @@ $route['configedit']='configurationctrl/configedit';
|
||||
$route['departmentListing'] = 'department/departmentListing';
|
||||
$route['departmentListing/(:num)'] = "department/departmentListing/$1";
|
||||
|
||||
|
||||
|
||||
$route['adddepartment'] = "department/adddepartment";
|
||||
$route['addNewdepartment'] = "department/addNewdepartment";
|
||||
|
||||
|
||||
$route['editOlddepartment'] = "department/viewdepartment";
|
||||
$route['editOlddepartment/(:num)'] = "department/viewdepartment/$1";
|
||||
$route['editdepartment'] = "department/editdepartment";
|
||||
/* End of file routes.php */
|
||||
/* Location: ./application/config/routes.php */
|
||||
|
||||
@ -178,7 +178,7 @@ class department extends BaseController
|
||||
|
||||
$data['department'] = $this->department_model->getDeptInfo($DepartmentID);
|
||||
$data['depcode'] = $this->department_model->getdepcode();
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Supplier';
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Department';
|
||||
$this->loadViews("editdepartment", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
|
||||
@ -1,82 +1,49 @@
|
||||
|
||||
<script>
|
||||
|
||||
//Email Validate
|
||||
// function blockKeyPress(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// alert(charCode);
|
||||
// if(charCode == 8 || charCode == 46 )
|
||||
//
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// function isNumberKey(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// if (charCode != 46 && charCode > 31
|
||||
// && (charCode < 48 || charCode > 57))
|
||||
// return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function blockKeyPress(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
alert(charCode);
|
||||
if(charCode == 8 || charCode == 46 )
|
||||
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
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 onlyAlphabets(evt) {
|
||||
var charCode;
|
||||
if (window.event)
|
||||
charCode = window.event.keyCode; //for IE
|
||||
else
|
||||
charCode = evt.which; //for firefox
|
||||
if (charCode == 32) //for <space> symbol
|
||||
return true;
|
||||
if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||||
return false;
|
||||
if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||||
return false;
|
||||
if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
// function onlyAlphabets(evt) {
|
||||
// var charCode;
|
||||
// if (window.event)
|
||||
// charCode = window.event.keyCode; //for IE
|
||||
// else
|
||||
// charCode = evt.which; //for firefox
|
||||
// if (charCode == 32) //for <space> symbol
|
||||
// return true;
|
||||
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
|
||||
$(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;
|
||||
|
||||
$("#dateofCST").datepicker({
|
||||
//minDate : new Date(year-30,1,1),
|
||||
maxDate :'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -120,7 +87,7 @@ $(function() {
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1" style="border:3px solid #3c8dbc;">
|
||||
<form class="form-horizontal" role="form" id="addsupplier" action="<?php echo base_url() ?>addNewdepartment" method="post" role="form">
|
||||
<form class="form-horizontal" role="form" id="adddepartment" action="<?php echo base_url() ?>addNewdepartment" method="post" role="form">
|
||||
<fieldset>
|
||||
|
||||
<!-- Form Name -->
|
||||
@ -184,8 +151,8 @@ $(function() {
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
<input type="reset" id="reset" class="btn btn-info" value="Reset" />
|
||||
<input type="submit" onclick="return Validat();" class="btn btn-primary">
|
||||
<input type="reset" id="reset" class="btn btn-primary" value="Reset" />
|
||||
<input type="submit" onclick="return Validat();" class="btn btn-primary" value="Submit"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
209
application/views/editdepartment.php
Normal file
209
application/views/editdepartment.php
Normal file
@ -0,0 +1,209 @@
|
||||
<?php
|
||||
|
||||
$DEPCode = '';
|
||||
$DepartmentName = '';
|
||||
$HeadDept = '';
|
||||
$IsActive ='';
|
||||
$chk ='';
|
||||
if(!empty($department))
|
||||
{
|
||||
foreach ($department as $uf)
|
||||
{
|
||||
$DEPCode = $uf->DEPCode;
|
||||
$DepartmentName = $uf->DepartmentName;
|
||||
$HeadDept = $uf->HeadDept;
|
||||
//$IsActive = $uf->IsActive;
|
||||
//echo 'CST date:'. $CSTDt ;
|
||||
$chk = $uf->IsActive;
|
||||
|
||||
if($chk == 1)
|
||||
{
|
||||
$IsActive = 'checked';
|
||||
}
|
||||
else
|
||||
{
|
||||
$IsActive = '';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
// function blockKeyPress(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// alert(charCode);
|
||||
// if(charCode == 8 || charCode == 46 )
|
||||
//
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// function isNumberKey(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// if (charCode != 46 && charCode > 31
|
||||
// && (charCode < 48 || charCode > 57))
|
||||
// return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// function onlyAlphabets(evt) {
|
||||
// var charCode;
|
||||
// if (window.event)
|
||||
// charCode = window.event.keyCode; //for IE
|
||||
// else
|
||||
// charCode = evt.which; //for firefox
|
||||
// if (charCode == 32) //for <space> symbol
|
||||
// return true;
|
||||
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
legend{
|
||||
color:#00c0ef ! important;
|
||||
}
|
||||
|
||||
.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> Siddharth Industries - <?php echo $DepartmentName; ?> Department DETAILS</center>
|
||||
|
||||
</h1>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>departmentListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<!-- general form elements -->
|
||||
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<!-- form start -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1" style="border:3px solid #3c8dbc;">
|
||||
<form class="form-horizontal" role="form" id="Updatedepartment" action="<?php echo base_url() ?>editdepartment" method="post" role="form">
|
||||
<fieldset>
|
||||
|
||||
<!-- Form Name -->
|
||||
<legend>Department Information</legend>
|
||||
<div class="col-md-2 pad">
|
||||
<span for="DEPCode">DEPCode</span>
|
||||
<input type="text" name="DEPCode" id="DEPCode" class="form-control" readonly value="<?php echo $DEPCode;?>">
|
||||
</div>
|
||||
<div class="col-md-4 pad">
|
||||
<span for="DepartmentName">DepartmentName</span><span class="badge">*</span>
|
||||
<input type="text" name="DepartmentName" id="DepartmentName" class="form-control" required value="<?php echo $DepartmentName;?>">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<span for="HeadDept">Head Department</span>
|
||||
<select class="form-control required" id="HeadDept" name="HeadDept">
|
||||
<option value="<?php echo $HeadDept?>"><?php echo $HeadDept?></option>
|
||||
<?php
|
||||
if(!empty($depcode))
|
||||
{
|
||||
foreach ($depcode as $DC)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $DC->HeadDept?>"><?php echo $DC->HeadDept ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-offset-1 col-md-2">
|
||||
<div class="form-group">
|
||||
<span for="Active">IsActive</span> <br>
|
||||
<input type="checkbox" id="IsActive" name="IsActive" <?php echo $IsActive;?> >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
|
||||
<input type="submit" value="update" class="btn btn-primary">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$this->load->helper('form');
|
||||
$error = $this->session->flashdata('error');
|
||||
if($error)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = $this->session->flashdata('success');
|
||||
if($success)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user