<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h3 class="head-title"><i class="fa fa-file-word-o"></i><small> <?php echo $this->lang->line('manage_education'); ?></small></h3>
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content quick-link">
<?php //$this->load->view('profile/quick-link'); ?>
</div>
<div class="x_content">
<div class="" data-example-id="togglable-tabs">
<ul class="nav nav-tabs bordered">
<li class="<?php if(isset($list)){ echo 'active'; }?>"><a href="#tab_complain_list" role="tab" data-toggle="tab" aria-expanded="true"><i class="fa fa-list-ol"></i> <?php echo $this->lang->line('list'); ?></a> </li>
<?php if(has_permission(ADD, 'usereducation', 'usereducation')){ ?>
<?php if(isset($edit)){ ?>
<li class="<?php if(isset($add)){ echo 'active'; }?>"><a href="<?php echo site_url('usereducation/add'); ?>" aria-expanded="false"><i class="fa fa-plus-square-o"></i> <?php echo $this->lang->line('add'); ?></a> </li>
<?php }else{ ?>
<li class="<?php if(isset($add)){ echo 'active'; }?>"><a href="#tab_add_complain" role="tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-plus-square-o"></i> <?php echo $this->lang->line('add'); ?></a> </li>
<?php } ?>
<?php } ?>
<?php if(isset($edit)){ ?>
<li class="active"><a href="#tab_edit_complain" role="tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-pencil-square-o"></i> <?php echo $this->lang->line('edit'); ?> </a> </li>
<?php } ?>
</ul>
<br/>
<div class="tab-content">
<div class="tab-pane fade in <?php if(isset($list)){ echo 'active'; }?>" id="tab_complain_list" >
<div class="x_content">
<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th><?php echo $this->lang->line('sl_no'); ?></th>
<!--<th><?php echo $this->lang->line('exam_type'); ?></th> -->
<th><?php echo $this->lang->line('exam_name'); ?></th>
<th><?php echo $this->lang->line('passing_year'); ?></th>
<th><?php echo $this->lang->line('subject_group'); ?></th>
<th><?php echo $this->lang->line('institute'); ?></th>
<th><?php echo $this->lang->line('result_type'); ?></th>
<th><?php echo $this->lang->line('mark_cgpa'); ?></th>
<th><?php echo $this->lang->line('action'); ?></th>
</tr>
</thead>
<tbody>
<?php $count = 1; if(isset($educations) && !empty($educations)){ ?>
<?php foreach($educations as $obj){ ?>
<tr>
<td><?php echo $count++; ?></td>
<!-- <td><?php echo $obj->exam_type; ?></td>-->
<td><?php echo $obj->exam_name; ?></td>
<td><?php echo $obj->passing_year; ?></td>
<td><?php echo $obj->subject_group; ?></td>
<td><?php echo $obj->institute; ?></td>
<td><?php echo $obj->result_type; ?></td>
<td><?php echo $obj->mark_cgpa; ?></td>
<td>
<?php if(has_permission(EDIT, 'usereducation', 'usereducation') && $obj->action_note == ''){ ?>
<a href="<?php echo site_url('usereducation/edit/'.$obj->id); ?>" class="btn btn-info btn-xs"><i class="fa fa-pencil-square-o"></i> <?php echo $this->lang->line('edit'); ?> </a>
<?php } ?>
<!-- <?php if(has_permission(VIEW, 'usereducation', 'usereducation')){ ?>
<a onclick="get_complain_modal(<?php echo $obj->id; ?>);" data-toggle="modal" data-target=".bs-complain-modal-lg" class="btn btn-success btn-xs"><i class="fa fa-eye"></i> <?php echo $this->lang->line('view'); ?> </a>
<?php } ?>-->
<?php if(has_permission(DELETE, 'usereducation', 'usereducation') && $obj->action_note == ''){ ?>
<a href="<?php echo site_url('usereducation/delete/'.$obj->id); ?>" onclick="javascript: return confirm('<?php echo $this->lang->line('confirm_alert'); ?>');" class="btn btn-danger btn-xs"><i class="fa fa-trash-o"></i> <?php echo $this->lang->line('delete'); ?> </a>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade in <?php if(isset($add)){ echo 'active'; }?>" id="tab_add_complain">
<div class="x_content">
<?php echo form_open_multipart(site_url('usereducation/add'), array('name' => 'add', 'id' => 'add', 'class'=>'form-horizontal form-label-left'), ''); ?>
<input type="hidden" name="school_id" id="school_id" value="<?php echo $this->session->userdata('school_id'); ?>" />
<!--<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type_id"><?php echo $this->lang->line('exam_type'); ?> <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select class="form-control col-md-7 col-xs-12" name="exam_type" id="type_id" required="required">
<option value="">--<?php echo $this->lang->line('select'); ?>--</option>
<option value="Secondary">Secondary</option>
<option value="Higher Secondary">Higher Secondary</option>
<option value="Bachelor/Honors">Bachelor/Honors</option>
<option value="Masters">Masters</option>
<option value="Phd">Phd</option>
</select>
<div class="help-block"><?php echo form_error('exam_type'); ?></div>
</div>
</div>-->
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="exam_name"><?php echo $this->lang->line('exam_name'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="exam_name" id="exam_name" value="<?php echo isset($post['exam_name']) ? $post['exam_name'] : ''; ?>" placeholder="<?php echo $this->lang->line('exam_name'); ?>" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('exam_name'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="passing_year"><?php echo $this->lang->line('passing_year'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="passing_year" id="passing_year" value="<?php echo isset($post['passing_year']) ? $post['passing_year'] : ''; ?>" placeholder="<?php echo $this->lang->line('passing_year'); ?>" required="required" type="number" autocomplete="off">
<div class="help-block"><?php echo form_error('passing_year'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="subject_group"><?php echo $this->lang->line('subject_group'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="subject_group" id="subject_group" value="<?php echo isset($post['subject_group']) ? $post['subject_group'] : ''; ?>" placeholder="<?php echo $this->lang->line('subject_group'); ?>" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('subject_group'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="institute"><?php echo $this->lang->line('institute'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="institute" id="subject_group" value="<?php echo isset($post['institute']) ? $post['institute'] : ''; ?>" placeholder="<?php echo $this->lang->line('institute'); ?>" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('institute'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type_id">Location <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="country" id="country" value="<?php echo isset($post['country']) ? $post['country'] : ''; ?>" placeholder="Country" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('country'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type_id"><?php echo $this->lang->line('result_type'); ?> <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select class="form-control col-md-7 col-xs-12" name="result_type" id="result_type" required="required">
<option value="">--<?php echo $this->lang->line('select'); ?>--</option>
<option value="Grade/CGPA">Grade/CGPA</option>
<option value="Division">Division</option>
</select>
<div class="help-block"><?php echo form_error('result_type'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mark_cgpa"><?php echo $this->lang->line('mark_cgpa'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="mark_cgpa" id="subject_group" value="<?php echo isset($post['mark_cgpa']) ? $post['mark_cgpa'] : ''; ?>" placeholder="<?php echo $this->lang->line('mark_cgpa'); ?>" required="required" type="number" autocomplete="off">
<div class="help-block"><?php echo form_error('mark_cgpa'); ?></div>
</div>
</div>
<!-- <div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="description"><?php echo $this->lang->line('description'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<textarea class="form-control col-md-7 col-xs-12" name="description" id="description" required="required" placeholder="<?php echo $this->lang->line('description'); ?>"><?php echo isset($post['description']) ? $post['description'] : ''; ?></textarea>
<div class="help-block"><?php echo form_error('description'); ?></div>
</div>
</div>
-->
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<a href="<?php echo site_url('usereducation/index'); ?>" class="btn btn-primary"><?php echo $this->lang->line('cancel'); ?></a>
<button id="send" type="submit" class="btn btn-success"><?php echo $this->lang->line('submit'); ?></button>
</div>
</div>
<?php echo form_close(); ?>
</div>
</div>
<?php if(isset($edit)){ ?>
<div class="tab-pane fade in active" id="tab_edit_complain">
<div class="x_content">
<?php echo form_open_multipart(site_url('usereducation/edit/'.$education->id), array('name' => 'edit', 'id' => 'edit', 'class'=>'form-horizontal form-label-left'), ''); ?>
<input type="hidden" name="school_id" id="school_id" value="<?php echo $education->school_id; ?>" />
<!-- <div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type_id"><?php echo $this->lang->line('exam_type'); ?> <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select class="form-control col-md-7 col-xs-12" name="exam_type" id="type_id" required="required">
<option value="">--<?php echo $this->lang->line('select'); ?>--</option>
<option value="Secondary"<?php if($education->exam_type == 'Secondary'){ echo 'selected="selected"';} ?>>Secondary</option>
<option value="Higher Secondary"<?php if($education->exam_type == 'Higher Secondary'){ echo 'selected="selected"';} ?>>Higher Secondary</option>
<option value="Bachelor/Honors"<?php if($education->exam_type == 'Bachelor/Honors'){ echo 'selected="selected"';} ?>>Bachelor/Honors</option>
<option value="Masters"<?php if($education->exam_type == 'Masters'){ echo 'selected="selected"';} ?>>Masters</option>
<option value="Phd"<?php if($education->exam_type == 'Phd'){ echo 'selected="selected"';} ?>>Phd</option>
</select>
<div class="help-block"><?php echo form_error('exam_type'); ?></div>
</div>
</div>-->
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="exam_name"><?php echo $this->lang->line('exam_name'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="exam_name" id="exam_name" value="<?php echo isset($education->exam_name) ? $education->exam_name : ''; ?>" placeholder="<?php echo $this->lang->line('exam_name'); ?>" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('exam_name'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="passing_year"><?php echo $this->lang->line('passing_year'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="passing_year" id="passing_year" value="<?php echo isset($education->passing_year) ? $education->passing_year : ''; ?>" placeholder="<?php echo $this->lang->line('passing_year'); ?>" required="required" type="number" autocomplete="off">
<div class="help-block"><?php echo form_error('passing_year'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="subject_group"><?php echo $this->lang->line('subject_group'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="subject_group" id="subject_group" value="<?php echo isset($education->subject_group) ? $education->subject_group : ''; ?>" placeholder="<?php echo $this->lang->line('subject_group'); ?>" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('subject_group'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="institute"><?php echo $this->lang->line('institute'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="institute" id="subject_group" value="<?php echo isset($education->institute) ? $education->institute : ''; ?>" placeholder="<?php echo $this->lang->line('institute'); ?>" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('institute'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type_id">Location <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="country" id="country" value="<?php echo isset($education->country) ? $education->country : ''; ?>" placeholder="country" required="required" type="text" autocomplete="off">
<div class="help-block"><?php echo form_error('country'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type_id"><?php echo $this->lang->line('result_type'); ?> <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select class="form-control col-md-7 col-xs-12" name="result_type" id="result_type" required="required">
<option value="">--<?php echo $this->lang->line('select'); ?>--</option>
<option value="Grade/CGPA" <?php if($education->result_type == 'Grade/CGPA'){ echo 'selected="selected"';} ?>>Grade/CGPA</option>
<option value="Division" <?php if($education->result_type == 'Division'){ echo 'selected="selected"';} ?>>Division</option>
</select>
<div class="help-block"><?php echo form_error('result_type'); ?></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mark_cgpa"><?php echo $this->lang->line('mark_cgpa'); ?> <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="mark_cgpa" id="subject_group" value="<?php echo isset($education->mark_cgpa) ? $education->mark_cgpa : ''; ?>" placeholder="<?php echo $this->lang->line('mark_cgpa'); ?>" required="required" type="number" autocomplete="off">
<div class="help-block"><?php echo form_error('mark_cgpa'); ?></div>
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<input type="hidden" value="<?php echo isset($education) ? $education->id : $id; ?>" name="id" />
<a href="<?php echo site_url('usereducation/index'); ?>" class="btn btn-primary"><?php echo $this->lang->line('cancel'); ?></a>
<button id="send" type="submit" class="btn btn-success"><?php echo $this->lang->line('update'); ?></button>
</div>
</div>
<?php echo form_close(); ?>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade bs-complain-modal-lg" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><?php echo $this->lang->line('detail_information'); ?></h4>
</div>
<div class="modal-body fn_complain_data">
</div>
</div>
</div>
</div>
<script type="text/javascript">
function get_complain_modal(complain_id){
$('.fn_complain_data').html('<p style="padding: 20px;"><p style="padding: 20px;text-align:center;"><img src="<?php echo IMG_URL; ?>loading.gif" /></p>');
$.ajax({
type : "POST",
url : "<?php echo site_url('usereducation/get_single_education'); ?>",
data : {complain_id : complain_id},
success: function(response){
if(response)
{
$('.fn_complain_data').html(response);
}
}
});
}
</script>
<link href="<?php echo VENDOR_URL; ?>datepicker/datepicker.css" rel="stylesheet">
<script src="<?php echo VENDOR_URL; ?>datepicker/datepicker.js"></script>
<script type="text/javascript">
$('#add_complain_date').datepicker();
$('#edit_complain_date').datepicker();
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#datatable-responsive').DataTable( {
dom: 'Bfrtip',
iDisplayLength: 15,
buttons: [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5',
'pageLength'
],
search: true,
responsive: true
});
});
$("#add").validate();
$("#edit").validate();
</script>