<?php

$title = 'Search ExportLog Details';
$thePage = $this->page;
$thePageRecord = $this->pageRecord;
?>
<div>
    <?php $this->placeholder('breadcrumb')->set('<a href="/relationships.php">Relationships</a> > View ExportLog Details');?>    
    <div class="panelHeader">
        <h3><?=$title?></h3>
    </div>
    <div class="panelContent">
        <form name="search_exportlogdetails_request" id="search_exportlogdetails_request" action="/relationships/viewexportlogdetails/" method="get">
            <table class="form full">
                <tr>
                    <th>Vendor Id :</th>
                    <td><input type="text" name="vendorId" size="20" maxlength="100" class="textField small" /></td>
                </tr>
                <tr>
                    <th>UPC :</th>
                    <td><input type="text" name="upc" size="20" maxlength="16" class="textField small" /></td>
                </tr>
                <tr>
                    <th>Track Id :</th>
                    <td><input type="text" name="trackId" size="20" maxlength="16" class="textField small" /></td>
                </tr>
                <tr>
                    <th>ISRC :</th>
                    <td><input type="text" name="isrc" size="20" maxlength="16" class="textField small" /></td>
                </tr>
            </table>
            <input type="hidden" name="page" id="page" value="1" />
            <input    type="hidden" name="pageRecord" id="pageRecord" value="20" />
            <div class="panelButtons">
                <input class="btn btn-primary btn-sm" type="submit" value="Search" name="searchBtn" id="searchBtn" /> 
                <input type="reset" name="resetBtn" id="resetBtn" value="Clear All" class="btn btn-default btn-sm"/>
            </div>
        </form>
    </div>
</div>
<script>
$(document).ready(function() {
    $("#search_exportlogdetails_request").submit(function(){
        var valid=0;
        $(this).find('input[type=text]').each(function(){
            var formVal = $.trim($(this).val());
            $(this).val(formVal);  
              if ($.trim($(this).val()).length > 0){                
                valid+=1;
            }
        });
        
        if(valid>0){           
            return true;
        }
        else {
            alert("You must fill in at least one field to search.");
            return false;
        }
    });
});
</script>