<table class='companyInfo hide'>
  <tbody>
    <?php if(count($companies) > 1):?>
    <tr>
      <th><?php echo $lang->depositor->company;?></th>
      <td><?php echo html::select('company', $companies, '', "class='form-control'");?></td>
    </tr>
    <?php else:?>
    <tr class='hidden'><td colspan='2'><?php echo html::hidden('company', (!empty($companies) ? key($companies) : 0));?></td></tr>
    <?php endif;?>
  </tbody>
</table>

<script>
$('#type').parents('tr').before($('.companyInfo tbody').html());
$('select#company').chosen();
</script>
