<div id="flapAutopilot" class="tab-pane fade in boxFlex">
   <div class="row">
      <div class="col-md-12">
         <h1 class="h4 main-panel-title">{'basicAutopilot'|translate:'autopilotTab'}</h1>
      </div>
   </div>
   <div class="form-group">
      {block autopilotDescr}
      <div class="col-md-6">
         Autopilot bere objednávky, které jsou
         <span class="small">
            <ul>
            {foreach $tab.data.autopilotDescr as $li}
               <li>{$li}</li>
            {/foreach}
            </ul>
         </span>
         <div class="input-group" style="white-space: nowrap;">
            Ze stavů:
            {print_select name="data[autopilot][from_statuses][]" param="multiple" var=$tab.data.statuses selected=$tab.data.fromStatuses}
         </div>
         <div class="input-group" style="white-space: nowrap;">
            a přesouvá je do stavu&nbsp;
            {print_select name="data[autopilot][status]" var=$tab.data.statuses selected=$dbcfg.autopilot.status}
         </div>
      </div>
      {/block}
      <div class="col-md-1 control-label">
         <label>{'enable'|translate:'autopilotTab'}</label>
      </div>
      <div class="col-md-1">
         {print_toggle name="autopilot][enable" value={$dbcfg.autopilot.enable}}
      </div>
      <div class="col-md-3 col-md-offset-1">
         <button type="submit" class="btn btn-success btn-block" name="acn" value="testAutopilot">{'test'|translate:'autopilotTab'}</button>
      </div>
   </div>
   {if $tab.data.test}
      <div class="panel panel-default first">
         <div class="panel-body">
            <h1 class="h4 main-panel-title">Test</h1>
            <div style="overflow: auto; width: 100%;">
               <table class="table">
                  <thead>
                  <tr>
                     <th style="width: 10%;">&nbsp;</th>
                     <th style="width: 20%;">{'order'|translate:'autopilotTab'}</th>
                     <th style="width: 70%;">{'comment'|translate:'autopilotTab'}</th>
                  </tr>
                  </thead>
                  <tbody>
                  {$i = 1}
                  {foreach $tab.data.test.orders as $id_order => $log}
                     <tr>
                        <td>{$i++}</td>
                        <td>
                           <a href="javascript:nw('orders', {$id_order})">{$id_order}</a>
                        </td>
                        <td>{$log|implode:'<br/>' nofilter}</td>
                     </tr>
                  {/foreach}
                  </tbody>
               </table>
            </div>
         </div>
      </div>
   {/if}
</div>
