<!-- BEGIN: MAIN -->
{FILE "{PHP.cfg.themes_dir}/admin/{PHP.cfg.admintheme}/warnings.tpl"}

<div>
  <div class="box">
    <h4 class="h_title">{PHP.L.new_category}</h4>
    <form name="addcatextratypes" action="{PHP|cot_url('admin', 'm=other&p=catextratypes&a=add')}" method="post" enctype="multipart/form-data">
      <input type="hidden" name="earea" value="market" />
      <div class="form-horizontal">
        <div class="row row-box odd-box">
          <div class="col-md-2">{PHP.L.Ea_parentcat}:</div>
          <div class="col-md-10">{ADMIN_STRUCTURE_PARENT} </div>
        </div>
        <div class="row row-box">
          <div class="col-md-2">Параметр:</div>
          <div class="col-md-10">
            <input type="text" name="etitle" value="" class="form-control" maxlength="100">
            <small>(обязательно)</small>
          </div>
        </div>
      </div>
      <div class="row-box">
        <button type="submit" class="submit btn btn-primary">{PHP.L.Add}</button>
      </div>
    </form>
    <script>
      $('[name="ecatid"]').change(function() {
        localStorage.setItem('admin_lastcat_parent', $(this).val());
      });
      if(localStorage.getItem('admin_lastcat_parent') != '') {
        $('[name="ecatid"] option').prop('selected', false).filter('[value="'+localStorage.getItem('admin_lastcat_parent')+'"]').prop('selected', true).parent().change();
      }
    </script>
  </div>
</div>
<div class="tab-content box" style="border-top: 0;">
    <table class="table">
      <thead>
        <tr>
          <th>Категория</th>
          <th>Макс. кол-во<br>выбранных<br>параметров</th>
          <th>Возможность<br>добавить свои</th>
          <th style="width: 300px">Параметры</th>
        </tr>
      </thead>
      <tbody>
      <!-- BEGIN: EP_ROW -->
        <tr>
          <td rowspan="{EP_ROW_CNT}">
            #{EP_ROW_CAT_ID} {EP_ROW_CAT}
            <!-- IF {EP_ROW_CETLABEL_L} -->
             <br><small>label: {EP_ROW_CETLABEL_L}</small>
            <!-- ENDIF -->
            <!-- IF {EP_ROW_CETLABEL_T} -->
             <br><small>tooltip: {EP_ROW_CETLABEL_T}</small>
            <!-- ENDIF -->
          </td>
          <td rowspan="{EP_ROW_CNT}">{EP_ROW_CETLIMIT}</td>
          <td rowspan="{EP_ROW_CNT}">{EP_ROW_CETEXTRA}</td>
          <td>{EP_LIST_TITLE} - <a href="{EP_LIST_ID|cot_url('admin', 'm=other&p=catextratypes&a=del&id='$this)}">Удалить</a></td>
        </tr>
        <!-- BEGIN: EP_LIST -->
        <tr>
          <td>{EP_LIST_TITLE} - <a href="{EP_LIST_ID|cot_url('admin', 'm=other&p=catextratypes&a=del&id='$this)}">Удалить</a></td>
        </tr>
        <!-- END: EP_LIST -->
      <!-- END: EP_ROW -->
      </tbody>
    </table>
</div>
<!-- END: MAIN -->