12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5>{$meta_title}</h5>
- <div class="ibox-tools">
- <a class="toback" href="{:url('index')}">
- 返回上一页
- </a>
- </div>
- </div>
- <div class="ibox-content">
- <form method="post" action="{:url('add')}" class="form-horizontal">
- <input type="hidden" name="id" value="{$info['id']|default='0'}">
- <div class="form-group">
- <label class="col-sm-2 control-label">商品名称<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">商品价格<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="number" class="form-control" name="price" value="{$info.price|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">描述</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="description" value="{$info.description|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">商品分类<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <select name="cate_id" class="form-control">
- <option value="0">选择商品分类</option>
- {volist name='goods_cate' id='v'}
- <option value="{$v.cate_id|default=''}">{$v['name']}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">商品图片<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- {:widget('common/upimg',['name'=>'img','multi'=>0,'val'=>isset($info)?$info['img']:''])}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">状态</label>
- <div class="col-sm-6">
- <label class="cr-inline">
- <input type="radio" value="1" name="enable">正常
- </label>
- <label class="cr-inline">
- <input type="radio" value="0" name="enable">禁用
- </label>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-6 col-sm-offset-2">
- <button class="btn btn-primary ajax-post" target-form="form-horizontal" type="submit">确 定</button>
- <a href="{:url('index')}" class="btn btn-default">取 消</a>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script>
- $(document).ready(function(){
- formSetValue("enable", {$info.enable|default=1});
- });
- $(document).ready(function(){
- formSetValue("cate_id", {$info.cate_id|default=0});
- });
- $(document).ready(function(){
- formSetValue("type", {$info.type|default=0});
- });
- </script>
- {/block}
|