197 lines
8.4 KiB
PHP
197 lines
8.4 KiB
PHP
<script>
|
||
|
||
$(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;
|
||
|
||
$("#DateOfCreated").datepicker({
|
||
minDate : new Date(mindt,1,1),
|
||
maxDate : 'now',
|
||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||
|
||
|
||
});
|
||
$("#DateOfUpdated").datepicker({
|
||
minDate : new Date(year-SIAStartYear,1,1),
|
||
maxDate :'now',
|
||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,
|
||
|
||
|
||
|
||
});
|
||
|
||
|
||
|
||
});
|
||
|
||
|
||
</script>
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1>
|
||
<center>Add Material Master </center>
|
||
|
||
</h1>
|
||
|
||
</section>
|
||
|
||
<section class="content">
|
||
<div style="text-align:right;">
|
||
<a href="<?php echo base_url() ?>rawmaterialdetails/rawmaterialListing" class="btn btn-info" 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 -->
|
||
|
||
<form role="form" id="addUser" action="<?php echo base_url() ?>rawmaterialdetails/addNewRawMaterial" method="post" role="form">
|
||
<div class="box-body">
|
||
<div class="row">
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="MaterialName">Material Code</span>
|
||
<input type="text" class="form-control required " id="MaterialCode" name="MaterialCode" maxlength="10" readonly>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="MaterialName">Material Name</span>
|
||
<input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="MaterialType">Material Type</span>
|
||
<select class="form-control required" id="MaterialType" name="MaterialType">
|
||
<option value="null" required>Select Material Type</option>
|
||
<?php
|
||
if(!empty($material))
|
||
{
|
||
foreach ($material as $SID)
|
||
{
|
||
?>
|
||
<option value="<?php echo $SID->ConfigValue ?>"><?php echo $SID->ConfigValue ?></option>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="UOM">Unit of Mesurement</span>
|
||
<select class="form-control required" id="UOM" name="UOM">
|
||
<option value="0" required>Select UOM</option>
|
||
<?php
|
||
if(!empty($UOM))
|
||
{
|
||
foreach ($UOM as $SID)
|
||
{
|
||
?>
|
||
<option value="<?php echo $SID->ConfigValue; ?>"><?php echo $SID->ConfigValue ?>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="DateOfCreated">Created Date</span>
|
||
<input id="DateOfCreated" required name="DateOfCreated" onkeypress="return false;" maxlength="10" class="form-control">
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="Createdby">Created By</span>
|
||
|
||
<input type="text" class="form-control required" id="Createdby" name="Createdby" maxlength="255">
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="DateOfUpdated">Updated Date</span>
|
||
<input id="DateOfUpdated" required name="DateOfUpdated" onkeypress="return false;" maxlength="10" class="form-control">
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="form-group">
|
||
<span for="updatedby">Updated By</span>
|
||
|
||
<input type="text" class="form-control required" id="Createdby" name="Createdby" maxlength="255">
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="col-md-3">
|
||
<input type="checkbox" id="isactive" name="isactive" onclick="checkactive"> IsActive
|
||
</div>
|
||
</div><!-- /.box-body -->
|
||
|
||
<div class="box-footer" style="text-align:right">
|
||
<input type="submit" class="btn btn-info" value="Submit" />
|
||
<input type="reset" class="btn btn-info" value="Cancel" />
|
||
</div>
|
||
</form>
|
||
</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>
|
||
<script src="<?php echo base_url(); ?>assets/js/addUser.js" type="text/javascript"></script>
|