<?php 
$submit_url = "index?page=view_pro_template"; 
$show_all_page = "page=view_pro_template";
?>
<!-- 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-8 col-12">
                <label for="Name" class="control-label">Search By Item Template Name</label>
                <input type="text" class="form-control" id="search" name="search" value="<?php echo $search;?>"
                    placeholder="Name">
            </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">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>