McGansWebsite/admin/application/views/project/add_project.php
dotwingssoftware f2a40c268b 20230207
1. Have to test and deploy in server.  2. add faculty detail into employee table and student detail  into employee table, 3. Change Teaching Assistant into multiple select 4. User Profile
2023-02-07 18:41:26 +05:30

263 lines
11 KiB
PHP

<link href="<?=base_url();?>/assets/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<?php $this->load->view('includes/header');?>
<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" />
<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>&nbsp;<a class="parent-item" href="<?=base_url();?>/dashboard">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
</li>
<li>&nbsp;<a class="parent-item" href="<?=base_url();?>/project">Project</a>&nbsp;<i class="fa fa-angle-right"></i>
</li>
<li class="active">Add Project</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>Project</header>
</div>
<div class="card-body" id="bar-parent">
<form action="<?=base_url();?>add_project" method="post" class="form-horizontal" enctype="multipart/form-data" >
<div class="form-body">
<div class="form-group row">
<label class="control-label col-md-3"> Project Date
<span class="required"> * </span>
</label>
<div class="col-md-5" >
<input type="date" name="date" data-required="1" data-validation="required" class="form-control input-height formDatePicker">
</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">
<input name="projectName" type="text" placeholder="Enter Project Name" data-validation="required" class="form-control input-height" /> </div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Code
<span class="required"> * </span>
</label>
<div class="col-md-5">
<input name="code" type="text" placeholder="Enter Project Code" data-validation="required" class="form-control input-height" /> </div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Student
<span class="required"> * </span>
</label>
<div class="col-md-5">
<select class="form-control select2" id="sudent_id" name="student" data-validation="required">
<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">
<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)
{
?> <option value="<?=$sem->id;?>"><?=$sem->name.' - '.$sem->year;?></option><?php
}
}
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Subject
<span class="required"> * </span>
</label>
<div class="col-md-5">
<select class="form-control select2" name="subject" data-validation="required">
<option value="" selected="selected">Select</option>
<?php
if(isset($sub) && $sub->num_rows()>0)
{
foreach($sub->result() as $subject)
{
?> <option value="<?=$subject->id;?>"><?=$subject->name;?></option><?php
}
}
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Department.
<span class="required"> * </span>
</label>
<div class="col-md-5">
<select class="form-control select2" id="departmentId" name="department" data-validation="required">
<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>
<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>
<div class="form-group row">
<label class="control-label col-md-3">Description
<span class="required"> * </span>
</label>
<div class="col-md-5">
<textarea name="description" placeholder=" Enter Description" data-validation="required" class="form-control" rows="5"></textarea>
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Video
</label>
<div class="col-md-5">
<input name="vedio" type="text" placeholder="Enter Video Link" class="form-control input-height" /> </div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Drive Link
</label>
<div class="col-md-5">
<input name="drivelink" type="text" placeholder="Enter Drive Link" class="form-control input-height" /> </div>
</div>
<div class="form-group row">
<label class="control-label col-md-3">Title, Description & Image
</label>
<div class="col-md-2 compose-editor">
<input name="title[0]" id="projectTitle_0" type="text" class="form-control default">
</div>
<div class="col-md-2 compose-editor">
<textarea name="muldescription[0]" id="projectDescription_0" type="text" class="form-control default"></textarea>
</div>
<div class="col-md-2 compose-editor">
<input name="profileimage[0]" id="projectImage_0" type="file" class="form-control default">
</div>
<div class="col-md-1">
<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>
<div class="col-md-2 compose-editor">
<textarea name="muldescriptions[]" id="projectDescription" type="text" class="form-control default"></textarea>
</div>
<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 ---->
</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>
<?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() {
invIndex++;
var $template = $('#imageTemplate'),
$clone = $template
.clone(true)
.removeClass('hide')
.removeAttr('id')
.attr('data-book-index', invIndex)
.insertBefore($template);
// Update the name attributes
$clone
.find('[id="projectTitle"]').attr('id', 'projectTitle_'+invIndex).end()
.find('[id="projectImage"]').attr('id', 'projectImage_'+invIndex).end()
.find('[id="projectDescription"]').attr('id', 'projectDescription_'+invIndex).end()
.find('[name="titles[]"]').attr('name', 'title['+invIndex+']').end()
.find('[name="profileimages[]"]').attr('name', 'profileimage['+invIndex+']').end()
.find('[name="muldescriptions[]"]').attr('name', 'muldescription['+invIndex+']').end()
})
.on('click', '.removeButton', function(){
var $row = $(this).parents('.duplicate1'),
index = $row.attr('data-book-index');
$row.remove();
});
</script>