<?php 
$submit_url = $file_name."?page=view"; 
$show_all_page = "page=view";
?>
<!-- search form -->
<form class="form-horizontal" action="<?php echo $submit_url;?>" method="post" name="search_form" id="search_form">
	<div class="card-body">
		<div class="row">
		  <div class="col-lg-2 col-12">
			<label for="Customer" class="control-label">Works Order No</label>
			<? $gsi->getworkOrderListNew("work_order_no",$work_order_no,"100%",false,"form-control select2",""); ?>
		  </div>
		   <div class="form-group col-lg-2">
				  <label class="control-label" for="from_date">Works Order Date From<em></em></label>
				  <div class="">
					<input type="text" class="form-control datepicker" id="from_date" name="from_date" value="<?php echo (isset($from_date) && $from_date != "") ? utility::getFormatedDate($from_date) : ""; ?>" placeholder="DD-MM-YYYY" autocomplete="off" >
				  </div>
				</div>
		  <div class="col-lg-2 col-12">
			 <label class="control-label" for="to_date">Works Order Date To<em></em></label>
			  <div class="">
				<input type="text" class="form-control datepicker" id="to_date" name="to_date" value="<?php echo (isset($to_date) && $to_date != "") ? utility::getFormatedDate($to_date) : ""; ?>" placeholder="DD-MM-YYYY" autocomplete="off" >
			  </div>
		  </div>
		      
				<div class="form-group col-lg-3">
				  <label class="control-label" for="Type">Engineer<em></em></label>
				  <div class=""> <? $gsi->getEmployeeList("engineer_id", $engineer_id, "100%", false, "form-control",""); ?>
				  </div>
				</div>
		  <div style="clear:both;"></div>
		  <div class="col-sm-2">
			<label for="Search" class="control-label">&nbsp;</label><br>
			<button type="submit" class="btn btn-success">Search
				<i class="fa fa-refresh fa-spin" style="display:none;" id="page_load_div"></i>
			</button>
			<button type="button" value="Show All" onclick="javascript:window.location='?<?php echo $show_all_page ?>'" class="btn btn-info">Show All</button>
		  </div>
		</div>
	</div>
</form>
<!-- /.search form -->
<script type="text/javascript">
$(document).ready(function(){
	$('#search_form').submit(function(){
		$("#submit").attr("disabled", true);
		$('#page_load_div').show();
	});
});
</script>