<?php 
$submit_url = $file_name."?page=machine2"; 
$show_all_page = "page=machine2";
?>
<!-- search form -->
<div class="col-md-4">
<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-8">
			<label for="Machines" class="control-label">Filter by Machines</label>
			<?= $gsi->getStationList("machine_id",$machine_id,"100%",true,"form-control select2 ",""); ?>
		  </div>
		  <!--<div class="col-lg-4" style="clear:both;"></div>-->
		  <div class="col-lg-4">
			<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>
</div>
<!-- /.search form -->
<script type="text/javascript">
$(document).ready(function(){
	$('#search_form').submit(function(){
		$("#submit").attr("disabled", true);
		$('#page_load_div').show();
	});
});
</script>