<?php 
$submit_url = $file_name."?page=delivery_report"; 
$show_all_page = "page=delivery_report";
?>
<!-- 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-3 col-12">
				<label for="From" class="control-label">From</label>
				<input type="text" class="form-control datepicker" id="from_date" name="from_date" value="<?php (isset($from_date) && $from_date !="") ? utility::getFormatedDate($from_date) : "";?>" placeholder="DD-MM-YYYY"autocomplete="off">  
			  </div> 
		      <div class="col-lg-3 col-12">
				<label for="TO" class="control-label">TO</label>
				<input type="text" class="form-control datepicker" id="to_date" name="to_date" value="<?php (isset($to_date) && $to_date !="") ? utility::getFormatedDate($to_date) : "";?>" placeholder="DD-MM-YYYY" autocomplete="off"> 
			  </div>
			 
			  <div style="clear:both;"></div>
			  <div class="col-lg-1 col-12 hide">
				<label for="Archived" class="control-label">Archived</label><br>
				<input type="checkbox" class="flat-red" id="is_archive" name="is_archive" value="1"  <? echo ($is_archive ==1) ? 'checked':''; ?>>
			  </div>
			  
			  <div class="col-lg-4 col-12">
				<label for="Postcode" class="control-label">&nbsp;</label><br>
				<button type="submit" class="btn btn-success" id="submit">Search
					<i class="fas fa-sync-alt 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>