456 lines
16 KiB
PHP
Executable File
456 lines
16 KiB
PHP
Executable File
|
|
<style>
|
|
|
|
.designinput {
|
|
position: relative;
|
|
display: inline-block;
|
|
margin-left: 15px;
|
|
}
|
|
.slide-up {
|
|
display: inline-block;
|
|
width: 260px;
|
|
padding: 10px 0 10px 30px;
|
|
font-family: "Open Sans", sans;
|
|
font-weight: 400;
|
|
color: #377D6A;
|
|
background: #efefef;
|
|
border: 0;
|
|
border-radius: 3px;
|
|
outline: 0;
|
|
text-indent: 80px;
|
|
transition: all .3s ease-in-out;
|
|
}
|
|
.slide-up::-webkit-input-placeholder {
|
|
color: #efefef;
|
|
text-indent: 0;
|
|
font-weight: 300;
|
|
}
|
|
.slide-up + label {
|
|
color: #fff;
|
|
display: inline-block;
|
|
position: absolute;
|
|
transform: translateX(0);
|
|
top: 0;
|
|
left: 0;
|
|
padding: 10px 15px;
|
|
text-shadow: 0 1px 0 rgba(19, 74, 70, 0.4);
|
|
transition: all .3s ease-in-out;
|
|
border-top-left-radius: 3px;
|
|
border-bottom-left-radius: 3px;
|
|
overflow: hidden;
|
|
}
|
|
.slide-up + label:before, .slide-up + label:after {
|
|
content: "";
|
|
position: absolute;
|
|
right: 0;
|
|
left: 0;
|
|
z-index: -1;
|
|
transition: all .3s ease-in-out;
|
|
}
|
|
.slide-up + label:before {
|
|
top: 6px;
|
|
left: 5px;
|
|
right: 5px;
|
|
bottom: 6px;
|
|
background: #df2769;
|
|
}
|
|
.slide-up + label:after {
|
|
top: 0;
|
|
bottom: 0;
|
|
background: rgb(177, 177, 177);
|
|
}
|
|
|
|
span:nth-child(1) .slide-up {
|
|
text-indent: 105px;
|
|
}
|
|
|
|
span:nth-child(3) .slide-up {
|
|
text-indent: 125px;
|
|
}
|
|
|
|
span:nth-child(1) .slide-up:focus,
|
|
span:nth-child(1) .slide-up:active,
|
|
span:nth-child(3) .slide-up:focus,
|
|
span:nth-child(3) .slide-up:active {
|
|
text-indent: 0;
|
|
}
|
|
|
|
.slide-up:focus,
|
|
.slide-up:active {
|
|
color: #377D6A;
|
|
text-indent: 0;
|
|
background: #fff;
|
|
}
|
|
.slide-up:focus::-webkit-input-placeholder,
|
|
.slide-up:active::-webkit-input-placeholder {
|
|
color: #aaa;
|
|
}
|
|
.slide-up:focus + label,
|
|
.slide-up:active + label {
|
|
transform: translateY(-100%);
|
|
}
|
|
.slide-up:focus + label:before,
|
|
.slide-up:active + label:before {
|
|
border-radius: 5px;
|
|
}
|
|
.slide-up:focus + label:after,
|
|
.slide-up:active + label:after {
|
|
transform: translateY(100%);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.btn-success.focus, .btn-success:focus{
|
|
background-color: #dd2366;
|
|
border-color: #dd2366;
|
|
box-shadow:0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(233,30,99,.4);
|
|
}
|
|
.btn-success:hover, .btn-success:active, .btn-success.hover {
|
|
background-color: rgba(219, 34, 101, 0.64);
|
|
border-color: #dd2366;
|
|
box-shadow:0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(233,30,99,.4);
|
|
}
|
|
.btn-success {
|
|
background-color: #dd2366;
|
|
border-color: #dd2366;
|
|
box-shadow:0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(233,30,99,.4);
|
|
}
|
|
|
|
|
|
.btn-primary:hover, .btn-primary:active, .btn-primary.hover{
|
|
background-color: #087322;
|
|
}
|
|
.btn-primary12:hover, .btn-primary12:active, .btn-primary12.hover{
|
|
background-color: #FFC107;
|
|
color: #fff;
|
|
}
|
|
.btn-primary{
|
|
color: #fff;
|
|
background-color: rgba(18, 187, 23, 0.75);
|
|
border-color: rgba(18, 187, 23, 0.75);
|
|
box-shadow: 0 2px 2px 0 rgba(233,30,99,.14), 0 3px 1px -2px rgba(233,30,99,.2), 0 1px 5px 0 rgba(233,30,99,.12);
|
|
/*position: relative;*/
|
|
padding: 10px 19px;
|
|
margin: 0.3125rem 1px;
|
|
min-width: auto;
|
|
font-size: 1.20rem;
|
|
font-weight: 800;
|
|
line-height: 1.428571;
|
|
text-decoration: none;
|
|
text-transform: uppercase;
|
|
vertical-align: middle;
|
|
letter-spacing: 0;
|
|
cursor: pointer;
|
|
border: 0;
|
|
border-radius: .2rem;
|
|
outline: 0;
|
|
transition: box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1);
|
|
/*will-change: box-shadow,transform;*/
|
|
}
|
|
.btn-primary12{
|
|
color: #fff;
|
|
background-color:#f2b865;
|
|
border-color: #f2b865;
|
|
box-shadow: 0 2px 2px 0 rgba(233,30,99,.14), 0 3px 1px -2px rgba(233,30,99,.2), 0 1px 5px 0 rgba(233,30,99,.12);
|
|
/*position: relative;*/
|
|
padding: 10px 19px;
|
|
margin: 0.3125rem 1px;
|
|
min-width: auto;
|
|
font-size: 1.20rem;
|
|
font-weight: 800;
|
|
line-height: 1.428571;
|
|
text-decoration: none;
|
|
text-transform: uppercase;
|
|
vertical-align: middle;
|
|
letter-spacing: 0;
|
|
cursor: pointer;
|
|
border: 0;
|
|
border-radius: .2rem;
|
|
outline: 0;
|
|
transition: box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1);
|
|
/*will-change: box-shadow,transform;*/
|
|
}
|
|
|
|
.or-button{
|
|
position: relative;
|
|
margin: -13px;
|
|
display: inline-block;
|
|
padding: 2px 5px;
|
|
background-color: #fff;
|
|
border-radius: 38px;
|
|
}
|
|
.box-title-box{
|
|
color: #fff;
|
|
margin-left: 18px;
|
|
background: linear-gradient(60deg,#ec407a,#d81b60);
|
|
box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(233,30,99,.4);
|
|
display: inline-block;
|
|
border-radius: 3px;
|
|
padding: 13px;
|
|
margin-top: -50px;
|
|
margin-right: 15px;
|
|
float: left;
|
|
}
|
|
.nav-tabs-custom>.nav-tabs>li.active{
|
|
border-top-color:#dc2265 !important;
|
|
}
|
|
.box-solid{
|
|
box-shadow: 0 3px 4px 0 rgba(0,0,0,0.14),
|
|
0 3px 3px -2px rgba(0,0,0,0.12),
|
|
0 1px 8px 0 rgba(0,0,0,0.2);
|
|
}
|
|
</style>
|
|
|
|
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper" style="background-color: #eee;">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
</section>
|
|
<!-- Main content -->
|
|
<section class="content" style="margin-top: 50px;">
|
|
<div class="row">
|
|
|
|
<div class="col-md-offset-1 col-md-10">
|
|
<div class="box box-solid" style="padding: 20px;">
|
|
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<h3 class="box-title-box"><i class="fa fa-file" style="padding-right:5px;"></i>Document Master</h3>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-offset-9 col-md-3">
|
|
<button type="button" class="btn btn-block btn-success btn-sm" data-toggle="modal" data-target="#AddDocument">Add Document</button>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<table id="example2" class="table table-bordered table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>S.no</th>
|
|
<th>Document Name</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if(!empty($getdocument)){
|
|
foreach($getdocument as $gdoc){?>
|
|
<tr>
|
|
<td><?php echo $gdoc->DocumentCode;?></td>
|
|
<td><?php echo $gdoc->DocumentName;?></td>
|
|
<td style="text-align:center;"><?php echo $gdoc->IsActive == 1 ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Deactive</span>' ?></td>
|
|
<td style="text-align:center;"><span onclick="ToEditDocumentDetails(<?php echo $gdoc->DocumentCode; ?>)"><i class="fa fa-edit" data-toggle="tooltip" data-original-title="Click here to view/Edit <?php echo $gdoc->DocumentCode ?> Details" style="color: #dc2265;"></i></a>
|
|
</td>
|
|
</tr>
|
|
<?php }
|
|
}?>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th>S.no</th>
|
|
<th>Document Name</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- /.modal starts-->
|
|
<div class="modal fade" id="AddDocument">
|
|
<div class="modal-dialog" style="top: 40px;width: 70%;">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title box-title-box">Add Document</h4>
|
|
</div>
|
|
<!-- form start -->
|
|
<form role="form" action="<?php echo base_url() ?>Add_document_master" method="post" style="padding:40px;" enctype="multipart/form-data">
|
|
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-md-5 designinput">
|
|
<div class="form-group">
|
|
<input class="slide-up" id="DocumentName" name="DocumentName" type="text" placeholder="Enter Document name" /><label for="Document Name">Document Name</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-5">
|
|
<div class="form-group">
|
|
<label for="DocumentFile">Document Upload</label>
|
|
<input type="file" id="DocumentFile" name="DocumentFile" accept=".JPG,.PNG,.PDF" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<label for="Description">Description</label>
|
|
<textarea class="form-control" rows="3" id="Description" name="Description" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" style="padding-top:15px;">
|
|
<div class="col-md-2">
|
|
<div class="form-group">
|
|
<label>Active/Deactive
|
|
<input type="checkbox" class="flat-red" name="IsActive" id="IsActive" checked>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
<div class="or-button">Or</div>
|
|
<button type="reset" class="btn btn-primary12">Reset</button>
|
|
</div>
|
|
</form>
|
|
<!-- form End -->
|
|
</div>
|
|
<!-- /.modal-content -->
|
|
</div>
|
|
<!-- /.modal-dialog -->
|
|
</div>
|
|
<!-- /.modal -->
|
|
<!-- /.modal starts-->
|
|
<div class="modal fade" id="EditDocument">
|
|
<div class="modal-dialog" style="top: 40px;width: 70%;">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title box-title-box">Edit Document</h4>
|
|
</div>
|
|
<!-- form start -->
|
|
<form role="form" action="<?php echo base_url() ?>Update_document_master" method="post" style="padding:40px;" enctype="multipart/form-data">
|
|
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-md-5 designinput">
|
|
<div class="form-group">
|
|
<input class="slide-up" id="EditDocumentName" name="EditDocumentName" type="text" placeholder="Enter Document Name" /><label for="Document Name">Document Name</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-5">
|
|
<div class="form-group">
|
|
<label for="DocumentFile">Document Upload</label>
|
|
<input type="file" id="EditDocumentFile" name="DocumentFile" accept=".JPG,.PNG,.PDF" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<label for="Description">Description</label>
|
|
<textarea class="form-control" rows="3" id="EditDescription" name="EditDescription" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" style="padding-top:15px;">
|
|
<div class="col-md-2">
|
|
<div class="form-group">
|
|
<label>Active/Deactive
|
|
<input type="checkbox" class="flat-red" name="EditIsActive" id="EditIsActive" checked>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<input id="hidedocumentcode" name="HideDocumentCode" type="hidden" readonly />
|
|
<input id="hidedocument" name="HideDocument" type="hidden" readonly />
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
<div class="or-button">Or</div>
|
|
<button type="reset" class="btn btn-primary12">Reset</button>
|
|
</div>
|
|
</form>
|
|
<!-- form End -->
|
|
</div>
|
|
<!-- /.modal-content -->
|
|
</div>
|
|
<!-- /.modal-dialog -->
|
|
</div>
|
|
<!-- /.modal -->
|
|
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
<!-- ./col -->
|
|
</div>
|
|
<!-- /.row -->
|
|
|
|
</section>
|
|
<!-- /.content -->
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
|
|
<!-- jQuery 3 -->
|
|
<script src="<?php echo base_url(); ?>assets/bower_components/jquery/dist/jquery.min.js"></script>
|
|
<script>
|
|
$(function () {
|
|
$('#example1').DataTable()
|
|
$('#example2').DataTable({
|
|
'paging' : true,
|
|
'lengthChange': true,
|
|
'searching' : true,
|
|
'ordering' : true,
|
|
'info' : true,
|
|
'autoWidth' : false
|
|
})
|
|
//Flat red color scheme for iCheck
|
|
$('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
|
|
checkboxClass: 'icheckbox_flat-green',
|
|
radioClass : 'iradio_flat-green'
|
|
})
|
|
});
|
|
|
|
</script>
|
|
|
|
<script>
|
|
function ToEditDocumentDetails(arg){
|
|
|
|
$('#EditDocument').modal('show');
|
|
|
|
$.ajax({
|
|
data:{arg:arg},
|
|
type:"POST",
|
|
url:"<?php echo base_url();?>GetAll_document_master",
|
|
success:function(data) {
|
|
//alert(data);
|
|
|
|
$.each(JSON.parse(data), function (i, item) {
|
|
|
|
$('#hidedocumentcode').val(item.DocumentCode);
|
|
$('#EditDocumentName').val(item.DocumentName);
|
|
$('#EditDescription').val(item.DocumentDescription);
|
|
|
|
|
|
if(item.IsActive == 0){
|
|
|
|
$('.icheckbox_flat-green').attr("aria-checked", false);
|
|
$('.icheckbox_flat-green').removeClass('checked');
|
|
}
|
|
else{
|
|
|
|
$('.icheckbox_flat-green').attr("aria-checked", true);
|
|
$('.icheckbox_flat-green').addClass('checked');
|
|
|
|
}
|
|
$('#hidedocument').val(item.Document);
|
|
$('#EditDocumentFile').val(item.Document);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|