<?php
/**
 * The batch create view file of product module of ZDOO.
 *
 * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     商业软件，非开源软件
 * @author      Gang Liu <liugang@cnezsoft.com>
 * @package     product 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../../common/view/header.html.php';?>
<div class='panel'>
  <div class='panel-body'>
    <form method='post' id='ajaxForm' class='no-margin'>
      <table class='table table-form'>
        <thead>
          <tr class='text-center'>
            <th class='required'><?php echo $this->lang->product->name;?></th>
            <th class='w-120px required'><?php echo $this->lang->product->code;?></th>
            <th class='w-180px'><?php echo $this->lang->product->category;?></th>
            <th class='w-180px'><?php echo $this->lang->product->subject;?></th>
            <th class='w-180px'><?php echo $this->lang->product->model;?></th>
            <th class='w-100px'><?php echo $this->lang->product->unit;?></th>
            <th class='w-100px'><?php echo $this->lang->product->amount;?></th>
            <th class='w-100px'><?php echo $this->lang->product->type;?></th>
          </tr>
        </thead>
        <?php $i = 1;?>
        <tr class='text-center'>
          <td><?php echo html::input("name[$i]", '', "id='name{$i}' class='form-control' placeholder='{$this->lang->product->placeholder->batchCreate->name}'");?></td>
          <td><?php echo html::input("code[$i]", '', "id='code{$i}' class='form-control' placeholder='{$this->lang->product->placeholder->batchCreate->code}'");?></td>
          <td class='text-left'><?php echo html::select("category[$i]", $categories, '', "id='category{$i}' class='form-control chosen'");?></td>
          <td class='text-left'><?php echo html::select("subject[$i]", $subjects, '', "id='subject{$i}' class='form-control chosen'");?></td>
          <td class='text-left'><?php echo html::select("model[$i]", $models, '', "id='model{$i}' class='form-control chosen'");?></td>
          <td class='text-left'><?php echo html::select("unit[$i]", $units, '', "id='unit{$i}' class='form-control chosen'");?></td>
          <td><?php echo html::input("amount[$i]", '', "id='amount{$i}' class='form-control'");?></td>
          <td class='text-left'><?php echo html::select("type[$i]", $lang->product->typeList, '', "id='type{$i}' class='form-control chosen'");?></td>
        </tr>
        <?php for($i++; $i <= $config->product->batchCreateCount; $i++):?>
        <tr class='text-center'>
          <td><?php echo html::input("name[$i]", '', "id='name{$i}' class='form-control'");?></td>
          <td><?php echo html::input("code[$i]", '', "id='code{$i}' class='form-control'");?></td>
          <td class='text-left'><?php echo html::select("category[$i]", $categories, 'ditto', "id='category{$i}' class='form-control chosen'");?></td>
          <td class='text-left'><?php echo html::select("subject[$i]", $subjects, 'ditto', "id='subject{$i}' class='form-control chosen'");?></td>
          <td class='text-left'><?php echo html::select("model[$i]", $models, 'ditto', "id='model{$i}' class='form-control chosen'");?></td>
          <td class='text-left'><?php echo html::select("unit[$i]", $units, 'ditto', "id='unit{$i}' class='form-control chosen'");?></td>
          <td><?php echo html::input("amount[$i]", '', "id='amount{$i}' class='form-control'");?></td>
          <td class='text-left'><?php echo html::select("type[$i]", $lang->product->typeList + array('ditto' => $lang->ditto), 'ditto', "id='type{$i}' class='form-control chosen'");?></td>
        </tr>
        <?php endfor;?>
        <tr><td class='text-center form-actions' colspan='8'><?php echo html::submitButton() . html::backButton();?></td></tr>
      </table>
    </form>
  </div>
</div>
<?php include '../../../common/view/footer.html.php';?>
