170 lines
8.1 KiB
PHP
170 lines
8.1 KiB
PHP
|
<style>
|
||
|
.form-group {
|
||
|
margin-bottom: .5rem;
|
||
|
}
|
||
|
.form-control {
|
||
|
display: block;
|
||
|
width: 100%;
|
||
|
height: calc(1.80rem + 2px);
|
||
|
padding: .375rem .75rem;
|
||
|
font-size: .9rem;
|
||
|
font-weight: 400;
|
||
|
line-height: 1.5;
|
||
|
color: #495057;
|
||
|
background-color: #fff;
|
||
|
background-clip: padding-box;
|
||
|
border: 1px solid #ced4da;
|
||
|
border-radius: .25rem;
|
||
|
box-shadow: inset 0 0 0 transparent;
|
||
|
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||
|
text-align: right;
|
||
|
}
|
||
|
|
||
|
.custom-file-input {
|
||
|
position: relative;
|
||
|
z-index: 2;
|
||
|
width: 100%;
|
||
|
height: calc(1.80rem + 2px);
|
||
|
margin: 0;
|
||
|
overflow: hidden;
|
||
|
opacity: 0;
|
||
|
}
|
||
|
|
||
|
.custom-file-label {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
right: 0;
|
||
|
left: 0;
|
||
|
z-index: 1;
|
||
|
height: calc(1.80rem + 2px);
|
||
|
padding: .350rem .75rem;
|
||
|
overflow: hidden;
|
||
|
font-weight: 400;
|
||
|
line-height: 1.5;
|
||
|
color: #495057;
|
||
|
background-color: #fff;
|
||
|
border: 1px solid #ced4da;
|
||
|
border-radius: .25rem;
|
||
|
box-shadow: none;
|
||
|
}
|
||
|
|
||
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||
|
padding-left: 0;
|
||
|
/* height: auto; */
|
||
|
height: calc(1.80rem + 2px) !important;
|
||
|
margin-top: -3px;
|
||
|
}
|
||
|
|
||
|
.select2-container .select2-selection--single {
|
||
|
height: 30px;
|
||
|
}
|
||
|
|
||
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||
|
color: #444;
|
||
|
line-height: 20px;
|
||
|
}
|
||
|
|
||
|
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||
|
margin-top: 0 !important;
|
||
|
}
|
||
|
</style>
|
||
|
<div class="content-wrapper">
|
||
|
<div class="content">
|
||
|
<div class="container-fluid">
|
||
|
<div class="row">
|
||
|
<div class="col-3">
|
||
|
<div class="card card-primary card-outline">
|
||
|
<div class="card-header">
|
||
|
<h5 class="m-0"><?php echo isset($stockLocation) ? 'Edit' : 'Add'; ?> <?php echo $pageTitle; ?>
|
||
|
</h5>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<form method="POST" action="<?php echo isset($stockLocation) ? site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/" . $stockLocation->stocklocation_id) : site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add"); ?>" enctype="multipart/form-data" name="tbl_stocklocations">
|
||
|
<div class="row">
|
||
|
<!--COL START-->
|
||
|
<div class="col">
|
||
|
<div class="form-group">
|
||
|
<label for="title"> <?php myLang('Stock Location'); ?></label><input type="text" class="form-control" id="title" value="<?php echo isset($stockLocation) ? $stockLocation->title : ''; ?>" name="title">
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--COL END-->
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<!--COL START-->
|
||
|
<div class="col">
|
||
|
<div class="form-group">
|
||
|
<label for="description"><?php myLang('Description'); ?></label>
|
||
|
<textarea class="form-control" id="description" name="description"><?php echo isset($stockLocation) ? $stockLocation->description : ''; ?></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--COL END-->
|
||
|
</div>
|
||
|
<!-- <div class="row">
|
||
|
|
||
|
<div class="col">
|
||
|
<div class="form-group">
|
||
|
<label for="display_order"><?php //myLang('Display Order'); ?></label><input type="text" class="form-control" id="display_order" value="<?php //echo isset($stockLocation) ? $stockLocation->display_order : ''; ?>" name="display_order">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div> -->
|
||
|
<!-- <div class="row">
|
||
|
|
||
|
<div class="col">
|
||
|
<div class="form-group">
|
||
|
<label for="remarks"><?php //myLang('Remarks'); ?></label>
|
||
|
<textarea class="form-control" id="remarks" name="remarks"><?php //echo isset($stockLocation) ? $stockLocation->remarks : ''; ?></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div> -->
|
||
|
<button type="reset" class="btn btn-default btn-sm">Reset</button> <button class="btn btn-primary btn-sm" type="submit" name="submit"><?php echo isset($stockLocation) ? 'Update' : 'Save'; ?></button>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-9">
|
||
|
<div class="card card-primary card-outline">
|
||
|
<div class="card-header">
|
||
|
<h5 class="m-0"> <?php echo $pageTitle; ?> List </h5>
|
||
|
<?php //showCreateButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/add", "Create New " . $pageTitle); ?>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<?php $TableData = $this->db->query("select * from tbl_stocklocations where status=1")->result(); ?>
|
||
|
<table class="table table-bordered table-striped dataTable">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th class="table-col col-1"><?php myLang('S.N'); ?></th>
|
||
|
<th><?php myLang('Stock Location'); ?></th>
|
||
|
<th class="table-col col-1">Action</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<?php $a = 0;
|
||
|
foreach ($TableData as $TableRow) : $a++; ?>
|
||
|
<?php foreach ($TableRow as $cols) : $id = $cols;
|
||
|
break;
|
||
|
endforeach; ?><tr>
|
||
|
<td><?php echo $a; ?></td>
|
||
|
<td><?php echo $TableRow->title; ?></td>
|
||
|
<td><?php showEditButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/edit/$id"); ?>
|
||
|
<?php showDeleteButton($id); ?>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<?php endforeach; ?>
|
||
|
<tbody>
|
||
|
</table>
|
||
|
<script>
|
||
|
function doDelete(id) {
|
||
|
if (confirm('Are you sure to delete?')) {
|
||
|
window.location = '<?php echo site_url($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/delete/"); ?>' + id;
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|