105 lines
3.1 KiB
PHP
105 lines
3.1 KiB
PHP
<script>
|
|
function validate(){
|
|
var dept_name = $('#dept_name').val();
|
|
if(dept_name == ''){
|
|
BootstrapDialog.alert('Please Enter department Name.!!!');
|
|
return false;
|
|
}
|
|
|
|
// var dept_headname = $('#dept_headname').val();
|
|
// if(dept_headname == ''){
|
|
// BootstrapDialog.alert('Please Enter department head name.!!!');
|
|
// return false;
|
|
// }
|
|
|
|
// var dept_email = $('#dept_email').val();
|
|
// if(dept_email == ''){
|
|
// BootstrapDialog.alert('Please Enter department email .!!!');
|
|
// return false;
|
|
// }
|
|
|
|
// var dept_id = $('#dept_id').val();
|
|
// if(dept_id == ''){
|
|
// BootstrapDialog.alert('Please Enter department Code.!!!');
|
|
// return false;
|
|
// }
|
|
|
|
save_department();
|
|
}
|
|
</script>
|
|
<style>
|
|
#modal-add-patient{
|
|
overflow-y:scroll;
|
|
}
|
|
</style>
|
|
<div class="modal fade" id="modal-add-patient" name="modal-add-patient" role="dialog" aria-hidden="true">
|
|
<form role="form" id="department_form" name="department_form" action="#" method="post">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="widget-header">
|
|
<h5 class="widget-title">Department</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="user_role">Bussiness Unit</label>
|
|
<select class="form-control" name="bu_id" id="bu_id" onChange="loadSBUList(this.value,'dept_name')" >
|
|
<?php echo generateOption('bussiness_unit','bu_name','bu_id','',''); ?>
|
|
</select>
|
|
<input type="hidden" class="form-control" name="section_id"
|
|
id="section_id" value="" required/>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="role">Department Name</label>
|
|
|
|
<input type="text" class="form-control" name="dept_name"
|
|
id="dept_name" maxlength="50" placeholder="Enter Department Name" required/>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="role">Department Head Name</label>
|
|
|
|
<input type="text" class="form-control" name="dept_headname"
|
|
id="dept_headname" maxlength="50" placeholder="Enter Department Head Name" required/>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="role">Department Head Email</label>
|
|
|
|
<input type="text" class="form-control" name="dept_email"
|
|
id="dept_email" maxlength="50" placeholder="Enter Department Head Email" required/>
|
|
</div>
|
|
<div class="form-group">
|
|
|
|
<input type="hidden" class="form-control" name="dept_id"
|
|
id="dept_id" maxlength="10" required/>
|
|
</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>
|
|
|