120 lines
4.7 KiB
PHP
120 lines
4.7 KiB
PHP
<script>
|
|
function addingDiv(credit_to){
|
|
if(credit_to=='2'){
|
|
$("#employee_cat_div").show();
|
|
$("#employee_div").hide();
|
|
}else if(credit_to=='3'){
|
|
$("#employee_cat_div").hide();
|
|
$("#employee_div").show();
|
|
|
|
}else {
|
|
$("#employee_cat_div").hide();
|
|
$("#employee_div").hide();
|
|
}
|
|
|
|
}
|
|
function validate(){
|
|
|
|
save_assign_checkup();
|
|
}
|
|
</script>
|
|
<style>
|
|
#modal-add-ailment{
|
|
overflow-y:scroll;
|
|
}
|
|
</style>
|
|
<div class="modal fade" id="modal-add-checkup-assign" name="modal-add-checkup-assign" role="dialog" aria-hidden="true">
|
|
<form role="form" id="checkup_assign_form" name="checkup_assign_form" action="#" method="post">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="widget-header">
|
|
<h5 class="widget-title">Checkup Assign Form</h5>
|
|
<div class="widget-toolbar">
|
|
<div class="widget-menu">
|
|
<a href="#" class="close" data-action="close" data-dismiss="modal">
|
|
<i class="ace-icon fa fa-times"></i>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div class="form-group ">
|
|
<input type="hidden" name="assign_checkup_id" id="assign_checkup_id">
|
|
<label for="role">Credit To</label>
|
|
<select class="chosen-select form-control" id="credit_to" name="credit_to" data-placeholder="Select Credit To" onchange="addingDiv(this.value)">
|
|
<option value=""></option>
|
|
<option value="1">All Employee</option>
|
|
<option value="2">Employee Categories</option>
|
|
<option value="3">Specific Employee</option>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="form-group" style="display:none" id="employee_cat_div">
|
|
<label for="role">Employee Categories</label>
|
|
<select class="chosen-select form-control" id="employee_cat" multiple="" name="employee_cat[]" data-placeholder="Select Employee Categories" >
|
|
|
|
<?php echo generateOption('employee_category','emp_cat_name','emp_cat_id','',''); ?>
|
|
</select>
|
|
|
|
</div>
|
|
<div class="form-group" style="display:none" id="employee_div">
|
|
<label for="role">Specific Employee</label>
|
|
<select class="chosen-select form-control" id="employee_id" name="employee_id" data-placeholder="Select Employee" >
|
|
<option value=""></option>
|
|
<?php echo generateOption('employee',"CONCAT(fname,' ',lname)",'id','',''); ?>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
<div class="form-group" >
|
|
|
|
|
|
<label for="role">Checkup Schedule</label>
|
|
<select class="chosen-select form-control" id="schedule_id" name="schedule_id" data-placeholder="Select Training Schedule" >
|
|
<option value=""></option>
|
|
<?php $query = "select * from checkup_list_mgmt ";
|
|
$result = @mysqli_query($conn,$query);
|
|
while($rows_schedule = mysqli_fetch_assoc($result)){
|
|
$checkup_name=getTableFieldValue('checkup_master','checkup_name','checkup_master_id',$rows_schedule['checkup_mgmt_name']);
|
|
?> <option value="<?php echo $rows_schedule['checkup_mgmt_id']?>"><?php echo $checkup_name.'('.$rows_schedule['checkup_by'].','.date_format(date_create($rows_schedule['from_date']),"d-M-Y").' '.date_format(date_create($rows_schedule['to_date']),"d-M-Y").')'?></option><?php
|
|
}
|
|
?>
|
|
<?php //echo generateOption('training_schedule',"CONCAT(from_date,' ',to_date)",'schedule_id','',''); ?>
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="ailment">Assign Date(Training)</label>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="input-group">
|
|
<input class="form-control date-picker" name="assign_date" id="assign_date" type="text" data-date-format="dd/mm/yyyy" />
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="widget-toolbox padding-8 clearfix" >
|
|
<button type="button" class="btn btn-info btn-sm save_button" onclick="validate();"><i class="ace-icon fa fa-floppy-o bigger-110"></i>Save </button>
|
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="ace-icon fa fa-times bigger-110"></i>Cancel</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|