<?php
/**
 * The set level view file of score module of ZDOO.
 *
 * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     商业软件，非开源软件
 * @author      LiuRuoGu <liuruogu@cnezsoft.com>
 * @package     score
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('level', $lang->score->level);?>
<div class='main-row'>
  <?php include 'side.html.php';?>
  <div class='panel'>
    <div class='panel-heading'>
      <strong><?php echo $lang->score->setLevel;?></strong>
    </div>
    <div class='panel-body'>
      <form id='ajaxForm' method='post'>
        <table class='table table-condensed table-borderless'>
          <tr class='text-center'>
            <th class='w-140px'><?php echo $lang->score->scoreLevel;?></th>
            <th class='w-140px'><?php echo $lang->score->threshold;?></th>
            <th></th>
          </tr>
          <?php foreach($levelList as $key => $threshold):?>
          <tr class='text-middle'>
            <td class='text-center'><span class='level-index'><?php echo $lang->score->level . ++$key;?></span></td>
            <td><?php echo html::number("levelList[]", $threshold, "class='form-control' min='0'");?></td>
            <td>
              <a href='javascript:;' class='btn btn-sm add'><i class='icon-plus'></i></a>
              <a href='javascript:;' class='btn btn-sm remove'><i class='icon-remove'></i></a>
            </td>
          </tr>
          <?php endforeach;?>
          <tr>
            <td></td>
            <td colspan='3' class='form-actions'><?php echo html::submitButton();?></td>
          </tr>
        </table>
      </form>
    </div>
  </div>
</div>
<?php
$itemRow = <<<EOT
  <tr class='text-center'>
    <td class='text-center'><span class='level-index'></span></td>
    <td>
      <input type='number' min='0' value="" name="levelList[]" class='form-control'>
    </td>
    <td class='text-left text-middle'>
      <a href='javascript:;' class='btn btn-sm add'><i class='icon-plus'></i></a>
      <a href='javascript:;' class='btn btn-sm remove'><i class='icon-remove'></i></a>
    </td>
  </tr>
EOT;
?>
<?php js::set('itemRow', $itemRow);?>
<?php include '../../common/view/footer.html.php';?>
