<?php 
/**
 * The action conditions view file of product module of ZDOO.
 *
 * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     商业软件，非开源软件
 * @author      Xiying Guan <guanxiying@xirangit.com>
 * @package     product 
 * @version     $Id $
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../../common/view/header.modal.html.php';?>
<form method='post' id='ajaxForm' action="<?php echo inlink('actionConditions', "actionID={$action->id}");?>">
  <table class='table table-borderless'>
    <tr class='text-center'>
      <th class='w-160px'><?php echo $lang->product->field->field;?></th>
      <th class='w-160px'><?php echo $lang->product->action->conditions;?></th>
      <th><?php echo $lang->product->action->param;?></th>
      <th class='w-100px'><?php echo $lang->actions;?></th>
    </tr>
    <?php foreach($action->conditions as $condition):?>
    <tr>
      <td><?php echo html::select("field[]", $conditionFields, $condition->field, "class='form-control chosen'");?></td>
      <td><?php echo html::select("operater[]", $lang->order->operaterList, $condition->operater, "class='form-control'");?></td>
      <td><?php echo html::input("param[]", $condition->param, "class='form-control'");?></td>
      <td>
        <a href='javascript:;' class='btn addItem'><i class='icon-plus'></i></a>
        <a href='javascript:;' class='btn delItem'><i class='icon-remove'></i></a>
      </td>
    </tr>
    <?php endforeach;?>
    <tr><td class='form-actions text-center' colspan='4'><?php echo html::submitButton();?></td></tr>
  </table>
</form>
<table class='hide'>
  <tr id='originTR'>
    <td><?php echo html::select('field[]', $conditionFields, '', "class='form-control'");?></td>
    <td><?php echo html::select("operater[]", $lang->order->operaterList, '', "class='form-control'");?></td>
    <td><?php echo html::input("param[]", '', "class='form-control'");?></td>
    <td>
      <a href='javascript:;' class='btn addItem'><i class='icon-plus'></i></a>
      <a href='javascript:;' class='btn delItem'><i class='icon-remove'></i></a>
    </td>
  </tr>
</table>
<?php include '../../../common/view/footer.modal.html.php';?>
