123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <include file="public@header"/>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <div class="panel">
- <div class="panel-body">
- <form class="form-horizontal js-ajax-form " action="{$game_price_url.'Post'}" method="post">
- <div class="col-md-10">
- <div class="form-group">
- <label class="col-sm-2 control-label">{:lang('GAME_NAME')}:</label>
- <label class="col-sm-6 control-label" style="text-align:left">{$game.name}</label>
- </div>
- </div>
- <input name="app_id" type="hidden" value="{$game.id}"/>
- <table id="price" class="table table-bordered table-hover" style="margin:auto;width:80%;">
- <tr>
- <th class="text-center">{:lang('PRODUCT_NAME')}</th>
- <th class="text-center">{:lang('PRODUCT_ID')}</th>
- <th class="text-center">{:lang('CH_PRODUCT_ID')}</th>
- <th class="text-center">{:lang('PRODUCT_PRICE')}</th>
- <th class="text-center">
- <a onclick="addtr()" class="btn btn-success">
- <i class="fa fa-plus"></i>
- </a>
- </th>
- </tr>
- <foreach name="items" item="vo">
- <tr>
- <td>
- <input class="form-control" style="text-align:left;width:100%;" name="product_name[]" value="{$vo.product_name}">
- </td>
- <td>
- <input class="form-control" style="text-align:left;width:100%;" name="product_code[]" value="{$vo.product_code}">
- </td>
- <td>
- <input class="form-control" style="text-align:left;width:100%;" name="ch_product_code[]" value="{$vo.ch_product_code}">
- </td>
- <td>
- <input class="form-control" style="text-align:left;width:100%;" name="product_price[]" value="{$vo.product_price}">
- </td>
- <td style="text-align: center;">
- <a onclick="deletetr(this)" class="btn btn-danger"><i class="fa fa-minus"></i></a></td>
- </tr>
- </foreach>
- </table>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- </div>
- </div>
- {:token()}
- <div class="form-group">
- <div class="col-sm-offset-10 col-sm-9">
- <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- /*添加tr*/
- function addtr() {
- var tr = '<tr><td><input class="form-control" style="text-align:left;width:100%;" name="product_name[]" value=""></td>';
- tr += '<td><input class="form-control" style="text-align:left;width:100%;" name="product_code[]" value=""></td>';
- tr += '<td><input class="form-control" style="text-align:left;width:100%;" name="ch_product_code[]" value=""></td>';
- tr += '<td><input class="form-control" style="text-align:left;width:100%;" name="product_price[]" value=""></td>';
- tr += '<td style="text-align: center;"><a onclick="deletetr(this)" class="btn btn-danger"><i class="fa fa-minus"></i></a></td></tr>';
- $('#price').append(tr);
- }
- /*删除tr*/
- function deletetr(obj) {
- $(obj).parent().parent().remove();
- }
- </script>
- <include file="public@footer"/>
|