<?php
/**
 * The create trade mobile view file of refund module of ZDOO.
 *
 * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Tingting Dai <daitingting@xirangit.com>
 * @package     refund 
 * @version     $Id
 * @link        http://www.zdoo.com
 */

if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}
?>

<div class='heading divider'>
  <div class='title'><?php echo $lang->trade->common;?></div>
  <nav class='nav'><a data-dismiss='display'><i class='icon-remove muted'></i></a></nav>
</div>

<form class='content box' data-display-from='refundReimburseModal' id='createTradeForm' method='post' action='<?php echo $this->createLink('refund', 'createTrade', "type=$type&refundID=$refundID");?>'>
  <div class='control'>
    <label for='depositor'><?php echo $lang->trade->depositor;?></label>
    <div class='select'><?php echo html::select("depositor[$refund->id]", $depositorList, zget($this->config->refund, 'depositor', ''), "placeholder='{$lang->required}'");?></div>
  </div>
  <div class='control'>
    <label for='category'><?php echo $lang->trade->category;?></label>
    <div class='select'><?php echo html::select("category[$refund->id]", $categoryList, $refund->category, "placeholder='{$lang->required}'");?></div>
  </div>
  <div class='control'>
    <label for='dept'><?php echo $lang->trade->dept;?></label>
    <div class='select'><?php echo html::select("dept[$refund->id]", $deptList, $refund->dept, "placeholder='{$lang->required}'");?></div>
  </div>
  <div class='control'>
    <label for='money'><?php echo $lang->trade->money;?></label>
    <div class='row'>
      <div class='cell-8'>
        <?php echo html::input("money[$refund->id]", $refund->money, "class='input' placeholder='{$lang->required}'");?>
      </div>
      <div class='cell-4'>
        <?php echo html::input("currency[$refund->id]", zget($lang->currencyList, $refund->currency), "class='input' disabled");?>
      </div>
    </div>
  </div>
  <div class='control'>
    <label for='handlers'><?php echo $lang->trade->handlers;?></label>
    <div class='select multiple'><?php echo html::select("handlers[$refund->id][]", $userList, $refund->related, "multiple placeholder='{$lang->required}'");?></div>
  </div>
  <div class='control'>
    <label for='desc'><?php echo $lang->trade->desc;?></label>
    <?php echo html::textarea("desc[$refund->id]", $refund->name . ($refund->desc ? "\n" . $refund->desc : ''), "rows='3' class='textarea'");?>
  </div>
</form>

<div class='footer has-padding'>
  <button class='btn primary' type='button' data-submit='#createTradeForm'><?php echo $lang->save;?></button>
</div>

<script>
$(function()
{
    $('#createTradeForm').modalForm({onResult: true}).listenScroll({container: 'parent'});
});
</script>
