2023-01-08 20:46:58 +00:00
|
|
|
<link href="<?=base_url();?>/assets/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
|
|
|
<?php $this->load->view('includes/header');?>
|
2023-01-21 13:41:47 +00:00
|
|
|
<link href="<?=base_url();?>assets/select2/css/select2.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link href="<?=base_url();?>assets/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
|
2023-01-08 20:46:58 +00:00
|
|
|
<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 Project</div>
|
|
|
|
</div>
|
|
|
|
<ol class="breadcrumb page-breadcrumb pull-right">
|
|
|
|
<li><i class="fa fa-home"></i> <a class="parent-item" href="<?=base_url();?>/dashboard">Home</a> <i class="fa fa-angle-right"></i>
|
|
|
|
</li>
|
2023-01-21 13:41:47 +00:00
|
|
|
<li> <a class="parent-item" href="<?=base_url();?>/project">Project</a> <i class="fa fa-angle-right"></i>
|
|
|
|
</li>
|
|
|
|
<li class="active">Add Project</li>
|
2023-01-08 20:46:58 +00:00
|
|
|
</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>Project</header>
|
|
|
|
</div>
|
|
|
|
<div class="card-body" id="bar-parent">
|
2023-01-21 13:41:47 +00:00
|
|
|
<form action="<?=base_url();?>add_project" method="post" class="form-horizontal" enctype="multipart/form-data" >
|
2023-01-08 20:46:58 +00:00
|
|
|
<div class="form-body">
|
|
|
|
<div class="form-group row">
|
|
|
|
<label class="control-label col-md-3"> Project Date
|
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
2023-01-21 13:41:47 +00:00
|
|
|
<div class="col-md-5" >
|
|
|
|
<input type="date" name="date" data-required="1" data-validation="required" class="form-control input-height formDatePicker">
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<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-21 13:41:47 +00:00
|
|
|
<input name="projectName" type="text" placeholder="Enter Project Name" data-validation="required" class="form-control input-height" /> </div>
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
2023-01-21 13:41:47 +00:00
|
|
|
<label class="control-label col-md-3">Code
|
2023-01-08 20:46:58 +00:00
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-01-21 13:41:47 +00:00
|
|
|
<input name="code" type="text" placeholder="Enter Project Code" data-validation="required" class="form-control input-height" /> </div>
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
2023-01-21 13:41:47 +00:00
|
|
|
|
2023-01-08 20:46:58 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<label class="control-label col-md-3">Student
|
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-01-21 13:41:47 +00:00
|
|
|
<select class="form-control select2" id="sudent_id" name="student" data-validation="required">
|
2023-01-08 20:46:58 +00:00
|
|
|
<option value="" selected="selected">Select</option>
|
|
|
|
<?php
|
|
|
|
if(isset($stu) && $stu->num_rows()>0)
|
|
|
|
{
|
|
|
|
foreach($stu->result() as $student)
|
|
|
|
{
|
|
|
|
?> <option value="<?=$student->id;?>"><?=$student->name;?></option><?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label class="control-label col-md-3">Semester
|
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-01-21 13:41:47 +00:00
|
|
|
<select class="form-control select2" name="semesterId" data-validation="required">
|
|
|
|
<option value="" selected="selected">Select</option>
|
|
|
|
<?php
|
|
|
|
if(isset($semester) && $semester->num_rows()>0)
|
|
|
|
{
|
|
|
|
foreach($semester->result() as $sem)
|
|
|
|
{
|
2023-02-07 13:11:26 +00:00
|
|
|
?> <option value="<?=$sem->id;?>"><?=$sem->name.' - '.$sem->year;?></option><?php
|
2023-01-21 13:41:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</div>
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
2023-01-11 07:17:57 +00:00
|
|
|
<div class="form-group row">
|
2023-01-21 13:41:47 +00:00
|
|
|
<label class="control-label col-md-3">Subject
|
2023-01-08 20:46:58 +00:00
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-01-21 13:41:47 +00:00
|
|
|
<select class="form-control select2" name="subject" data-validation="required">
|
2023-01-11 07:17:57 +00:00
|
|
|
<option value="" selected="selected">Select</option>
|
|
|
|
<?php
|
|
|
|
if(isset($sub) && $sub->num_rows()>0)
|
|
|
|
{
|
|
|
|
foreach($sub->result() as $subject)
|
|
|
|
{
|
2023-01-21 13:41:47 +00:00
|
|
|
?> <option value="<?=$subject->id;?>"><?=$subject->name;?></option><?php
|
2023-01-11 07:17:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</div>
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label class="control-label col-md-3">Department.
|
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-01-21 13:41:47 +00:00
|
|
|
<select class="form-control select2" id="departmentId" name="department" data-validation="required">
|
2023-01-08 20:46:58 +00:00
|
|
|
<option value="" selected="selected">Select</option>
|
|
|
|
<?php
|
|
|
|
if(isset($dep) && $dep->num_rows()>0)
|
|
|
|
{
|
|
|
|
foreach($dep->result() as $depart)
|
|
|
|
{
|
|
|
|
?> <option value="<?=$depart->id;?>"><?=$depart->name;?></option><?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-21 13:41:47 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<label class="control-label col-md-3">Title Image
|
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<input name="titleImage" type="file" data-validation="required" class="form-control input-height" /> </div>
|
|
|
|
</div>
|
2023-01-11 07:17:57 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<label class="control-label col-md-3">Description
|
|
|
|
<span class="required"> * </span>
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-02-07 13:11:26 +00:00
|
|
|
<textarea name="description" placeholder=" Enter Description" data-validation="required" class="form-control" rows="5"></textarea>
|
2023-01-11 07:17:57 +00:00
|
|
|
</div>
|
2023-01-21 13:41:47 +00:00
|
|
|
|
2023-01-11 07:17:57 +00:00
|
|
|
</div>
|
2023-01-08 20:46:58 +00:00
|
|
|
<div class="form-group row">
|
2023-01-11 07:17:57 +00:00
|
|
|
<label class="control-label col-md-3">Video
|
2023-01-08 20:46:58 +00:00
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-02-07 13:11:26 +00:00
|
|
|
<input name="vedio" type="text" placeholder="Enter Video Link" class="form-control input-height" /> </div>
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label class="control-label col-md-3">Drive Link
|
|
|
|
</label>
|
|
|
|
<div class="col-md-5">
|
2023-02-07 13:11:26 +00:00
|
|
|
<input name="drivelink" type="text" placeholder="Enter Drive Link" class="form-control input-height" /> </div>
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
2023-02-07 13:11:26 +00:00
|
|
|
<label class="control-label col-md-3">Title, Description & Image
|
2023-01-08 20:46:58 +00:00
|
|
|
</label>
|
2023-01-21 13:41:47 +00:00
|
|
|
|
|
|
|
<div class="col-md-2 compose-editor">
|
|
|
|
<input name="title[0]" id="projectTitle_0" type="text" class="form-control default">
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
2023-02-07 13:11:26 +00:00
|
|
|
<div class="col-md-2 compose-editor">
|
|
|
|
<textarea name="muldescription[0]" id="projectDescription_0" type="text" class="form-control default"></textarea>
|
|
|
|
</div>
|
2023-01-21 13:41:47 +00:00
|
|
|
<div class="col-md-2 compose-editor">
|
|
|
|
<input name="profileimage[0]" id="projectImage_0" type="file" class="form-control default">
|
|
|
|
</div>
|
2023-01-25 12:47:55 +00:00
|
|
|
<div class="col-md-1">
|
2023-01-21 13:41:47 +00:00
|
|
|
<div class="add-new-button-blue addMore"><span class="btn btn-primary">Add <i class="fa fa-plus"></i></span></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!---Duplicate ---->
|
|
|
|
<input type="hidden" value="0" id="view"/>
|
|
|
|
<div class="form-group duplicate1 row hide" id="imageTemplate" >
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
</label>
|
|
|
|
<div class="col-md-2 compose-editor">
|
|
|
|
<input name="titles[]" id="projectTitle" type="text" class="form-control default">
|
|
|
|
</div>
|
2023-02-07 13:11:26 +00:00
|
|
|
<div class="col-md-2 compose-editor">
|
|
|
|
<textarea name="muldescriptions[]" id="projectDescription" type="text" class="form-control default"></textarea>
|
|
|
|
</div>
|
2023-01-21 13:41:47 +00:00
|
|
|
<div class="col-md-2 compose-editor">
|
|
|
|
<input name="profileimages[]" id="projectImage" type="file" class="form-control default">
|
|
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
|
|
<div class="add-new-button-blue removeButton" id="cat_add_id"><span class="btn btn-danger">Remove <i class="fa fa-minus"></i></span></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!---Duplicate ---->
|
2023-01-08 20:46:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
|
|
<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>
|
2023-01-21 13:41:47 +00:00
|
|
|
<?php $this->load->view('includes/footer');?>
|
|
|
|
<script src="<?=base_url();?>assets/select2/js/select2.js"></script>
|
|
|
|
<script src="<?=base_url();?>assets/select2/js/select2-init.js"></script>
|
|
|
|
<script src="<?=base_url();?>assets/jquery.form-validator.min.js"></script>
|
|
|
|
<script>
|
|
|
|
//multiple add more
|
|
|
|
invIndex = 0;
|
|
|
|
$('body').on('click','.addMore', function() {
|
2023-01-08 20:46:58 +00:00
|
|
|
|
2023-01-21 13:41:47 +00:00
|
|
|
invIndex++;
|
|
|
|
var $template = $('#imageTemplate'),
|
|
|
|
$clone = $template
|
|
|
|
.clone(true)
|
|
|
|
.removeClass('hide')
|
|
|
|
.removeAttr('id')
|
|
|
|
.attr('data-book-index', invIndex)
|
|
|
|
.insertBefore($template);
|
2023-01-08 20:46:58 +00:00
|
|
|
|
2023-01-21 13:41:47 +00:00
|
|
|
// Update the name attributes
|
|
|
|
$clone
|
|
|
|
.find('[id="projectTitle"]').attr('id', 'projectTitle_'+invIndex).end()
|
|
|
|
.find('[id="projectImage"]').attr('id', 'projectImage_'+invIndex).end()
|
2023-02-07 13:11:26 +00:00
|
|
|
.find('[id="projectDescription"]').attr('id', 'projectDescription_'+invIndex).end()
|
2023-01-21 13:41:47 +00:00
|
|
|
|
|
|
|
.find('[name="titles[]"]').attr('name', 'title['+invIndex+']').end()
|
|
|
|
.find('[name="profileimages[]"]').attr('name', 'profileimage['+invIndex+']').end()
|
2023-02-07 13:11:26 +00:00
|
|
|
.find('[name="muldescriptions[]"]').attr('name', 'muldescription['+invIndex+']').end()
|
2023-01-21 13:41:47 +00:00
|
|
|
|
|
|
|
})
|
2023-01-11 07:17:57 +00:00
|
|
|
|
2023-01-21 13:41:47 +00:00
|
|
|
.on('click', '.removeButton', function(){
|
|
|
|
var $row = $(this).parents('.duplicate1'),
|
|
|
|
index = $row.attr('data-book-index');
|
|
|
|
$row.remove();
|
|
|
|
|
|
|
|
|
2023-01-11 07:17:57 +00:00
|
|
|
});
|
2023-01-21 13:41:47 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|