<form id="form" action="{:url('manage.gift/edit')}">
    <input type="hidden" name="id" value="{$info.id}"/>
<div class="titlebar fn-clear">
    <div class="fn-left"><i class="iconfont icon-my_icon"></i><span class="fn-fb">规则信息</span></span></div>    
</div>
<table class="formtable">
    <tr>
        <th>买单次数:</th>
        <td>
            <input class="input" datatype="n" type="text" name="pay_num" value="{$info.pay_num}" />
            <span class="gray fbn-f12">0 不限制,付款得到次数后赠送某礼品</span>
        </td>
    </tr>
    <tr>
        <th>付款额度:</th>
        <td><input class="input" datatype="npot" type="text" name="pay_amount" value="{$info.pay_amount}" />
            <span class="gray fbn-f12">0 不限制,付款得到指定额度后赠送某礼品</span>
        </td>
    </tr>
    <tr><th>赠送对象:</th><td>
        <span class="badge bg-blue"><input class="radio" type="radio" name="types" value="0" {if $info.types == 0}checked="true"{/if}> 所有用户</span>
        <span class="badge bg-yellow"><input class="radio" type="radio" name="types" value="1" {if $info.types == 1}checked="true"{/if}> 会员会员</span>
    </td></tr>
    <tr>
        <th>赠送优惠券:</th>
        <td><input url="{:url('allwin/Coupon/selectid')}" readonly="true" class="input readonly selectid" datatype="n" type="text" name="coupon_id" id="coupon_id" value="{$info.coupon_id}" />
            <span class="gray fbn-f12">选择优惠券ID,必须是禁止修改、所有通道都禁止领取的优惠券</span>
        </td>
    </tr>
</table>
<div class="titlebar fn-clear">
    <div class="fn-left"><i class="iconfont icon-my_icon"></i><span class="fn-fb">活动信息</span></span></div>    
</div>
<table class="formtable">
    <tr>
        <th>开始时间:</th>
        <td>
            <input readonly="true" class="input readonly ui-time" datatype="date" type="text" name="start_time" value="{$info.start_time|date='Y-m-d H:i:s'}" /> - 
            <input readonly="true" class="input readonly ui-time" datatype="date" type="text" name="end_time" value="{$info.end_time|date='Y-m-d H:i:s'}" />
        </td>
    </tr>
    <tr>
        <th>活动名称:</th>
        <td><input class="input w500" datatype="*" type="text" name="title" value="{$info.title}" /></td>
    </tr>
    <tr>
        <th>分享主图:</th>
        <td><input id="share_img" readonly class="input w500 ui-upload readonly" datatype="*" type="text" name="share_img" value="{$info.share_img}" /></td>
    </tr>
    <tr>
        <th>分享标题:</th>
        <td><input class="input w500" datatype="*" type="text" name="share_title" value="{$info.share_title}" /></td>
    </tr>
    <tr>
        <th>分享内容:</th>
        <td><input class="input w500" datatype="*" type="text" name="share_text" value="{$info.share_text}" /></td>
    </tr>
    <tr><th>活动介绍:</th><td><textarea name="note" class="textarea ui-editor">{$info.note|dehtml}</textarea></td></tr>
    <tr>
        <th></th>
        <td>
            <input type="submit" value="确定" class="button button-blue submit" />
            <input type="reset" value="重置" class="button button-blank"/>
        </td>
    </tr>
</table>
</div>
</form>
<script type="text/javascript">
Do('base','layer','form','editor','date',function () {
    $('#form').isForm({'upload':'{:url("system/passport.common/upload")}'});
    $(".selectid").win();
})
//添加图片
function share_img(value){
    $("#share_img").val(value);
}
</script>