245 lines
13 KiB
PHP
Executable File

<!--sidebar end-->
<!--main content start-->
<?php
$documentsarr=array();
$documentsrem=array();
foreach($documents as $document){
$documentsarr[$document->documents_type][]=$document->path.$document->file_name;
$documentsrem[$document->documents_type][]=$document->remarks;
//echo '<pre>'; print_r($document); echo '</pre>';
}
$traing_doc_count=count($documentsarr[_DOC_TRAININGCODE_]);
$other_doc_count=count($documentsarr[_DOC_OTHERCODE_]);
//die;
//echo '<pre>'; print_r($documentsarr['TRN']); echo '</pre>';die;
?>
<style type="text/css">
.required:after {
content: "*";
color: red;
}
</style>
<section id="main-content">
<section class="wrapper site-min-height">
<section class="row col-md-12">
<div class="col-md-12 panel-body">
<label> Progress (<?php echo $progress; ?>%)</label>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: <?php echo $progress; ?>%;" aria-valuenow="<?php echo $progress; ?>" aria-valuemin="0" aria-valuemax="100"><?php echo $progress; ?>%</div>
</div>
</div>
</section>
<!-- page start-->
<section class="row col-md-12" >
<header class="panel-heading">
<?php
// if (!empty($nurse->id))
// echo lang('Edit Caregiver Information');
// else
echo lang('Documents Upload');
?>
</header>
<div class="panel-body col-md-12">
<?php if($this->session->flashdata('feedback_error')){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'error',
title: '<?php echo $this->session->flashdata('feedback_error'); ?>',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<?php if($this->session->flashdata('feedback_success')){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'success',
title: '<?php echo $this->session->flashdata('feedback_success'); ?>',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<div class="col-lg-3"></div>
<div class="col-lg-6">
<?php //echo validation_errors(); ?>
<?php echo $this->session->flashdata('error'); ?>
</div>
<div class="col-lg-3"></div>
<div class="col-lg-12">
<div class="accordion" id="accordionExample">
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Basic Documents
</button>
</h2>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Medical Documents
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Training Documents
</button>
</h2>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#other" aria-expanded="false" aria-controls="collapseThree">
Other Documents
</button>
</h2>
</div>
<div id="other" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
</div>
</div>
</section>
<!-- page end-->
</section>
</section>
<script>
$( document ).ready(function() {
$('.nav-item').click(function(event){
if ($(this).hasClass('disabled')) {
return false;
}
});
});
function add_training_documents(id){
var splitid=id.split("_");
var nextid=Number(splitid[1])+1;
var nextidplus='plus_'+(nextid);
var nextidminus='minus_'+(nextid);
var nextidrow='row_'+(nextid);
//console.log(nextid);
$('#plus_'+splitid[1]).hide();
$('#minus_'+splitid[1]).hide();
var appenddata='<div class="row" id='+nextidrow+'>'
+'<div class="form-group col-md-4">'
+'<label for="exampleInputEmail1"><?php echo lang('Training Documents (gif/jpg/png/jpeg/pdf)'); ?></label>'
+'<input type="file" class="form-control" name="TRN[]" >'
+'</div>'
+'<div class="form-group col-md-6">'
+' <label for="exampleInputEmail1"><?php echo lang('Remarks'); ?></label>'
+' <input type="text" class="form-control" name="TRN_remarks[]" >'
+'</div>'
+'<div class="form-group col-md-1">'
+'<?php if($documentsarr['TRN'][0]!=""){ ?>'
+' <a target="_blank" href="<?php echo $documentsarr['TRN'][0]; ?>">'
+' <img src="uploads/attachment.png" class="img-thumbnail" style="height: 75px;">'
+' </a>'
+'<?php }else{ ?>'
+' <img src="uploads/attachment.png" class="img-thumbnail" style="height: 75px;">'
+'<?php } ?>'
+'</div>'
+'<div class="form-group col-md-1">'
+'<img src="uploads/plus.png" id="'+nextidplus+'" onclick="add_training_documents(this.id);" class="img-thumbnail" style="height: 50px; cursor: pointer;">'
+'<img src="uploads/minus.png" id="'+nextidminus+'" onclick="less_training_documents(this.id);" class="img-thumbnail" style="height: 60px; cursor: pointer;">'
+'</div>'
+'</div>';
$('#more_training_documents').append(appenddata);
}
function less_training_documents(id){
var splitid=id.split("_");
var previousid=Number(splitid[1])-1;
$('#plus_'+previousid).show();
$('#minus_'+previousid).show();
$('#row_'+splitid[1]).remove();
}
function add_other_documents(id){
var splitid=id.split("_");
var nextid=Number(splitid[1])+1;
var nextidplus='otherplus_'+(nextid);
var nextidminus='otherminus_'+(nextid);
var nextidrow='otherrow_'+(nextid);
//console.log(nextid);
$('#otherplus_'+splitid[1]).hide();
$('#otherminus_'+splitid[1]).hide();
var appenddata='<div class="row" id='+nextidrow+'>'
+'<div class="form-group col-md-4">'
+'<label for="exampleInputEmail1"><?php echo lang('Other Documents (gif/jpg/png/jpeg/pdf)'); ?></label>'
+'<input type="file" class="form-control" name="OTR[]" >'
+'</div>'
+'<div class="form-group col-md-6">'
+' <label for="exampleInputEmail1"><?php echo lang('Remarks'); ?></label>'
+' <input type="text" class="form-control" name="OTR_remarks[]" >'
+'</div>'
+'<div class="form-group col-md-1">'
+'<?php if($documentsarr['TRN'][0]!=""){ ?>'
+' <a target="_blank" href="<?php echo $documentsarr['OTR'][0]; ?>">'
+' <img src="uploads/attachment.png" class="img-thumbnail" style="height: 75px;">'
+' </a>'
+'<?php }else{ ?>'
+' <img src="uploads/attachment.png" class="img-thumbnail" style="height: 75px;">'
+'<?php } ?>'
+'</div>'
+'<div class="form-group col-md-1">'
+'<img src="uploads/plus.png" id="'+nextidplus+'" onclick="add_other_documents(this.id);" class="img-thumbnail" style="height: 50px; cursor: pointer;">'
+'<img src="uploads/minus.png" id="'+nextidminus+'" onclick="less_other_documents(this.id);" class="img-thumbnail" style="height: 60px; cursor: pointer;">'
+'</div>'
+'</div>';
$('#more_other_documents').append(appenddata);
}
function less_other_documents(id){
var splitid=id.split("_");
var previousid=Number(splitid[1])-1;
$('#otherplus_'+previousid).show();
$('#otherminus_'+previousid).show();
$('#otherrow_'+splitid[1]).remove();
}
</script>
<!--main content end-->
<!--footer start-->