<?php 
$submit_url = $file_name."?page=view"; 
$show_all_page = "page=view";
$set_number_input = isset($_REQUEST['set_number']) ? $_REQUEST['set_number'] : "";
$part_id_input = isset($_REQUEST['part_id']) ? $_REQUEST['part_id'] : "";
?>
<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 class="control-label">Set Number</label>
			<input type="text" 
			       class="form-control" 
			       name="set_number" 
			       value="<?= htmlspecialchars($set_number_input); ?>" 
			       placeholder="Set Number" 
			       autocomplete="off">
		  </div>
		  <div class="col-lg-3 col-12">
			<label class="control-label">Part Number</label>
			  <?= $gsi->getPartNumberList("part_id", $part_id_input, "100%", false, "form-control select2 part_select", ""); ?>
		  </div>
		  <div class="col-sm-3">
			<label class="control-label">&nbsp;</label><br>
			<button type="submit" class="btn btn-success">Search</button>
			<button type="button" onclick="window.location='?<?=$show_all_page?>'" class="btn btn-info">Show All</button>
		  </div>
		</div>
	</div>
</form>