McGansWebsite/admin/application/views/department/add_department.php

173 lines
5.0 KiB
PHP
Raw Normal View History

2023-01-10 09:41:20 +00:00
<link href="<?=base_url();?>/assets/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<style>
* {
box-sizing: border-box;
}
#myInput {
background-image: url('/css/searchicon.png');
background-position: 10px 10px;
background-repeat: no-repeat;
width: 100%;
font-size: 16px;
padding: 12px 20px 12px 40px;
border: 1px solid #ddd;
margin-bottom: 12px;
}
#myTable {
border-collapse: collapse;
width: 100%;
border: 1px solid #ddd;
font-size: 18px;
}
#myTable th, #myTable td {
text-align: left;
padding: 12px;
}
#myTable tr {
border-bottom: 1px solid #ddd;
}
#myTable tr.header, #myTable tr:hover {
background-color: #f1f1f1;
}
</style>
<?php $this->load->view('includes/header');?>
<div class="page-container">
<!-- start sidebar menu -->
<?php $this->load->view('includes/sidebar');?>
<!-- start page content -->
<div class="page-content-wrapper">
<div class="page-content">
<div class="page-bar">
<div class="page-title-breadcrumb">
<div class=" pull-left">
<div class="page-title">Add Department</div>
</div>
<ol class="breadcrumb page-breadcrumb pull-right">
<li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="<?=base_url();?>/dashboard">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
</li>
<li class="active">Department</li>
</ol>
</div>
</div>
<!-- Midium Model -->
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="card card-box">
<div class="card-head">
<header>Department</header>
</div>
<div class="card-body" id="bar-parent">
<form action="<?=base_url();?>add_department" method="post">
<div class="form-body">
<div class="form-group row">
<label class="control-label col-md-3">Name
<span class="required"> * </span>
</label>
<div class="col-md-5">
2023-01-11 07:17:57 +00:00
<input type="text" name="name" data-required="1" placeholder="Enter Your Name" class="form-control input-height">
2023-01-10 09:41:20 +00:00
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Code
2023-01-11 07:17:57 +00:00
<span class="required"> * </span>
2023-01-10 09:41:20 +00:00
</label>
<div class="col-md-5">
<input name="code" type="text" placeholder="Enter Your Code" class="form-control input-height" /> </div>
</div>
<div class="form-group row">
2023-01-11 07:17:57 +00:00
<label class="control-label col-md-3">Total Year
<span class="required"> * </span>
2023-01-10 09:41:20 +00:00
</label>
<div class="col-md-5">
2023-01-11 07:17:57 +00:00
<input name="year" type="text" placeholder="Enter Your Year" class="form-control input-height" /> </div>
2023-01-10 09:41:20 +00:00
</div>
2023-01-11 07:17:57 +00:00
<div class="form-group row">
<label class="control-label col-md-3">Images
</label>
<div class="col-md-5 compose-editor">
<input type="file" name="image" placeholder="Enter img" class="form-control default" >
</div>
2023-01-10 09:41:20 +00:00
</div>
2023-01-11 07:17:57 +00:00
</div>
</div>
</div>
<div class="form-actions">
2023-01-10 09:41:20 +00:00
<div class="row">
<div class="offset-md-3 col-md-9">
<input type="submit" name="submit" class="btn btn-info m-r-20" value="Submit">
<button type="button" class="btn btn-default">Cancel</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
</div>
</div>
</div>
<?php $this->load->view('includes/footer');?>
2023-01-11 07:17:57 +00:00
<script>
$(".departmentclass").click(function(){
$('#Model').modal('show');
var id=$(this).attr('data-id');
//alert(id);
$('#hiddenid').val(id);
});
</script>
<script type="text/javascript">
$(document).ready(function() {
var myPara = document.getElementById("example4");
2023-01-10 09:41:20 +00:00
2023-01-11 07:17:57 +00:00
$('#txtNum').on('keyup', function(e) {
// console.log("work")
//var #txtNum = (e.numrows ? e.numrows : e.which);
var myPara = document.getElementById("example4");
//console.log(myPara);
$('#numrows').append(myPara);
//console.log(#numrows);
//var rowcount = $('#numrows tr').length;
//console.log(rowcount);
// $('#numrows').html(rowcount);
// $('#numrows').html($(this).val());
// $(this).focus().select();
// rowcount++;
2023-01-10 09:41:20 +00:00
2023-01-11 07:17:57 +00:00
});
2023-01-10 09:41:20 +00:00
});
</script>
2023-01-11 07:17:57 +00:00
<script>
function myFunction() {
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>