{echo:JS::import('form');}
{echo:JS::import('date');}
<h1 class="page_title">代金券模板编辑</h1>
<div id="obj_form" class="form2">
    <form action="{url:/marketing/voucher_template_save}" method="post" >
        {if:isset($id)}<input type="hidden" name="id" id="objId" value="{$id}">{/if}
    <dl class="lineD">
      <dt><b class="red">*</b> 模板名称：</dt>
      <dd>
        <input name="name" type="text" pattern="required" value="{$name}" />
        <label> </label>
      </dd>
      </dl>
      <dl class="lineD">
      <dt><b class="red">*</b>面值：</dt>
      <dd>
        <input name="value" type="text" class="small"  pattern="float" value="{$value}"> 
        <label>代金券在购买时所抵金额</label>
      </dd>
      </dl><dl class="lineD">
      <dt><b class="red">*</b>消费金额：</dt>
      <dd>
        <input name="money" type="text" class="small" pattern="int" value="{$money}">
        <label>订单需满足的最低消费金额(必需为整数)才能使用</label>
      </dd>
      </dl><dl class="lineD">
      <dt><b class="red">*</b>兑换所需积分：</dt>
      <dd>
        <input name="point" type="text" class="small"  pattern="float" value="{$point|0}"> 
        <label>兑换所需积分只能是数字，必须大于等于0,0表示不能兑换</label>
      </dd>
      </dl><dl class="lineD">
      <dt><b class="red">*</b>兑换有效期：</dt>
      <dd>
        <input name="valid_days" type="text" class="small"  pattern="[1-9]\d*" value="{$valid_days|30}"> 
        <label>自兑换日期起，有效的天数,至少是一天。</label>
      </dd>
      </dl>

    <div style="text-align:center"><input type="submit" value="提交" class="button">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" class="button"></div>
    </form>
</div>

<script type="text/javascript">
var form =  new Form();
form.setValue('parent_id','{$parent_id}');
form.setValue('type_id','{$type_id}');

</script> 