{extends file="menu.tpl"}

{block name="menu-items"}
   <li class="nav-header"><i class="glyphicon glyphicon-tags"></i><span>{translate_type type=$type}</span></li>
   <li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
   <li class="pill-content">
      <ul class="nav-sub nav-pills">
         <form id='search' target="mainFrame" method="get" action="launch.php" class="form-inline">
            <input type="hidden" name="type" value="warehouseLog" /><input type="hidden" name="s" value="list.php">

            <div class="form-group">
               <div class="input-group">
                  {print_select name="location" var=["" => "Vyberte lokaci"] + $locations}
                  <span class="input-group-btn">
                     <button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat"><i class="glyphicon glyphicon-search"></i></button>
                  </span>
               </div>
            </div>

            <div class="form-group">
               <div class="input-group">
                  <input type="text" class="form-control input-sm" name="search" maxlength="20" value="" placeholder="{'searchCode'|translate}"/>
                  <span class="input-group-btn">
                        <button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat"><i class="glyphicon glyphicon-search"></i></button>
                     </span>
               </div>
            </div>

            <div class="form-group">
               <div class="input-group">
                  <input type="text" class="form-control input-sm" name="order" maxlength="20" value="" placeholder="Kód objednávky"/>
                  <span class="input-group-btn">
                        <button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat"><i class="glyphicon glyphicon-search"></i></button>
                     </span>
               </div>
            </div>


            <div class="form-group">
               <input type="text" class="form-control input-sm" name="id_product" maxlength="100" value="" onKeyPress="checkInputData('int')" placeholder="{'searchNameCode'|translate:'orders'}"  data-autocomplete-params="visible"/>
            </div>
            <div class="form-group">
               <select name="id_variation" class="input-sm form-control"></select>
               <script type="text/javascript">
                  $(function(){
                     initAutocompleteVariation('[name=id_product]', '[name=id_variation]');
                  });
               </script>
            </div>

            <div class="form-group">
               <div class="checkbox">
                  <input type="checkbox" class="input" name="onlyManuallyEdited" value="1" id="onlyManuallyEdited">
                  <label for="onlyManuallyEdited">{'onlyManuallyEdited'|translate}</label>
               </div>
            </div>

            <div class="form-group">
               <div class="checkbox">
                  <input type="checkbox" class="input" name="onlyReplacements" value="1" id="onlyReplacements">
                  <label for="onlyReplacements">{'onlyReplacements'|translate}</label>
               </div>
            </div>

            <div class="form-group">
               <div class="checkbox">
                  <input type="checkbox" class="input" name="onlyStockIn" value="1" id="onlyStockIn">
                  <label for="onlyStockIn">{'onlyStockIn'|translate}</label>
               </div>
            </div>

            <div class="form-group">
               <div class="checkbox">
                  <input type="checkbox" class="input" name="onlyCreation" value="1" id="onlyCreation">
                  <label for="onlyCreation">{'onlyCreation'|translate}</label>
               </div>
            </div>

            <div class="form-group">
               <div class="checkbox">
                  <input type="checkbox" class="input" name="onlyDeletion" value="1" id="onlyDeletion">
                  <label for="onlyDeletion">{'onlyDeletion'|translate}</label>
               </div>
            </div>

            <div class="form-group">
               <input type="text" class="form-control input-sm" name="dateFrom" id="dateFrom" maxlength="10" value="" placeholder="Od" autocomplete="off"/>
                {insert_calendar selector='#dateFrom' format='datetime'}
            </div>
            <div class="form-group">
               <input type="text" class="form-control input-sm" name="dateTo" id="dateTo" maxlength="10" value="" placeholder="Do" autocomplete="off"/>
                {insert_calendar selector='#dateTo' format='datetime'}
            </div>

            <div class="form-group">
               <input type="reset" value="{'delete'|translate:'orders'}" class="btn btn-danger btn-sm"/>
               <input type="submit" value="{'searchBtn'|translate:'orders'}" class="btn btn-primary btn-sm"/>
            </div>
         </form>
      </ul>
   </li>
{/block}
