108 lines
4.5 KiB
PHP
Executable File
108 lines
4.5 KiB
PHP
Executable File
|
|
<!--sidebar end-->
|
|
<!--main content start-->
|
|
<style type="text/css">
|
|
.required-field:after {
|
|
content: "*";
|
|
color: red;
|
|
}
|
|
.form-control.multiselect-class{
|
|
height: 100px !important;
|
|
}
|
|
</style>
|
|
<?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="app-content content">
|
|
<section class="content-wrapper">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<h3 class="font-weight-bold">
|
|
<?php
|
|
if (!empty($nurse->id))
|
|
echo lang('Edit Caregiver Schedule');
|
|
else
|
|
echo lang('Add Caregiver Schedule');
|
|
?>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="mt-0 mb-0" />
|
|
<div class="card-content collapse show">
|
|
<div class="card-body card-dashboard">
|
|
<div class="col-md-12">
|
|
<form action="caregivers/saveCaregiverSchedule" method="post">
|
|
<input type="hidden" name="caregiver_id" value="<?php echo $caregiver_id; ?>">
|
|
<div class="row">
|
|
<div class="form-group col-md-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Day'); ?></label>
|
|
<select class="form-control" id="week_day" required>
|
|
<option value="" selected disabled>Select</option>
|
|
<?php foreach($weekday as $day){ ?>
|
|
<option value="<?php echo $day->week_day;?>"><?php echo $day->week_day;?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label for="exampleInputEmail1"><?php echo lang('Time'); ?></label>
|
|
<select class="form-control multiselect-class" name="schedule_id[]" id="timeOption" multiple required>
|
|
<option value="" selected disabled>Select</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<button type="submit" name="submit" class="btn btn-info "><?php echo lang('submit'); ?></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
$("#week_day").on("change",function(){
|
|
var day=this.value;
|
|
$.ajax({
|
|
type:'GET',
|
|
url:'caregivers/getTimeOptionByDay',
|
|
data:'day='+day+'&caregiver_id=<?php echo $caregiver_id;?>',
|
|
success:function(data){
|
|
//console.log(data);
|
|
$('#timeOption').html(data);
|
|
//$('.form-control.multiselect-class').css({height:"100px !important;"});
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<!--main content end-->
|
|
<!--footer start-->
|