94 lines
3.5 KiB
PHP
94 lines
3.5 KiB
PHP
<script>
|
|
function validate() {
|
|
var box_name = $('#box_name').val();
|
|
if (box_name == '') {
|
|
BootstrapDialog.alert('Please Enter Box Name.!!!');
|
|
return false;
|
|
}
|
|
var box_code = $('#box_code').val();
|
|
if (box_code == '') {
|
|
BootstrapDialog.alert('Please Enter Box Code.!!!');
|
|
return false;
|
|
}
|
|
|
|
var box_loc = $('#box_loc').val();
|
|
if (box_loc == '') {
|
|
BootstrapDialog.alert('Please Enter Box Location.!!!');
|
|
return false;
|
|
}
|
|
save_first_aid_box();
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
#modal-add-first_aid_box {
|
|
overflow-y: scroll;
|
|
}
|
|
</style>
|
|
|
|
<div class="modal fade" id="modal-add-first_aid_box" role="dialog" aria-hidden="true">
|
|
<form role="form" id="first_aid_box_form" name="first_aid_box_form" action="#" method="post">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="widget-header">
|
|
<h5 class="widget-title"> First-Aid Box</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">
|
|
<label for="role">Box Name</label>
|
|
<input type="hidden" class="form-control" name="box_id" id="box_id" value="" required />
|
|
<input type="text" autofocus="autofocus" class="form-control" name="box_name" id="box_name"
|
|
maxlength="100" placeholder="Enter Box Name" required />
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="first_aid_box">Box Code</label>
|
|
<input type="text" class="form-control" name="box_code" id="box_code" maxlength="150"
|
|
placeholder="Enter Box code " required />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="first_aid_box">Box Loc</label>
|
|
<input type="text" class="form-control" name="box_loc" id="box_loc"
|
|
placeholder="Enter Box Location " required />
|
|
|
|
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="first_aider">First-Aider</label>
|
|
<input type="hidden" class="form-control" name="first_aiders" id="first_aiders" required />
|
|
|
|
<select class="form-control chosen-select" name="first_aider" id="first_aider"
|
|
placeholder="Select First Aider " multiple required>
|
|
<?= generateOption('patient_master', 'concat(patient_name," ",emp_code)', 'id', '', '');?>
|
|
</select>
|
|
|
|
|
|
</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>
|